我可以獲取UIRotationGestureRecognizer兩根手指的中點座標嗎?或每個手指的位置?謝謝。關於UIRotationGestureRecognizer
3
A
回答
4
你可以得到。
UIRotationGestureRecognizer
的文檔顯示屬性velocity
和rotation
。
這是特定於旋轉。
但是你可以使用從UIGestureRecognizer這些方法...
Getting the Touches and Location of a Gesture
– locationInView:
– locationOfTouch:inView:
– numberOfTouches
爲了讓觸摸和位置。
從這些你可以很容易地計算中點。
1
UIRotationGestureRecognizer
延伸UIGestureRecognizer
它有兩種方法:numberOfTouches
和locationOfTouch:inView:
。使用這些來獲取每個手指的位置。從那裏你可以計算出一箇中心。
相關問題
- 1. UIRotationGestureRecognizer
- 2. UIRotationGestureRecognizer上的UIImageView
- 3. 讓UIRotationGestureRecognizer更明智
- 4. UIRotationGestureRecognizer以直角捕捉
- 5. UIScrollView縮放問題與UIRotationGestureRecognizer
- 6. UIRotationGestureRecognizer激活多次Swift
- 7. UIRotationGestureRecognizer作爲音量旋鈕
- 8. UIRotationGestureRecognizer最小旋轉值
- 9. touchesMoved:withEvent:和UIRotationgestureRecognizer不一起工作
- 10. 使UIPinchGestureRecognizer和UIRotationGestureRecognizer一起工作
- 11. 如何使用UIRotationGestureRecognizer延遲旋轉?
- 12. iphone開發 - UIRotationGestureRecognizer(順時針和逆時針檢測)?
- 13. UIRotationGestureRecognizer旋轉有時會出現非常大的值
- 14. UIRotationGestureRecognizer無法在SKScene中調用處理程序方法
- 15. CCSprite旋轉速度非常快使用UIRotationGestureRecognizer的Cocos2D-iPhone
- 16. 使用UIRotationGestureRecognizer以固定角度(任意方向)旋轉UIView?
- 17. 在Swift 3中同時使用多個UIGestureRecognizers,如UIRotationGestureRecognizer和UIPanGestureRecognizer
- 18. 使用UIRotationGestureRecognizer旋轉圖像時出現問題?
- 19. 關於小於
- 20. 關於aps_developer_identity.cer相關
- 21. 關於python關閉
- 22. 關於
- 23. 關於
- 24. 關於==
- 25. 關於
- 26. 關於
- 27. 關於
- 28. 關於
- 29. 關於
- 30. 關於
非常感謝。 –