【发布时间】:2012-03-12 08:42:33
【问题描述】:
我想检测用户何时使用一根手指在 UIView 上做圆周运动
任何帮助将不胜感激
【问题讨论】:
标签: iphone sdk uigesturerecognizer uitouch
我想检测用户何时使用一根手指在 UIView 上做圆周运动
任何帮助将不胜感激
【问题讨论】:
标签: iphone sdk uigesturerecognizer uitouch
继承你的 UIView 并实现
– touchesBegan:withEvent:
– touchesMoved:withEvent:
– touchesEnded:withEvent:
– touchesCancelled:withEvent:
在触摸移动时,您会获得新的接触点,您可以查看这些接触点是否在圆弧上。
【讨论】:
我知道用一堆链接回答是不好的做法。但重新发明轮子也是如此。
看看:
Recognising a circle gesture to drop an annotation, how to detect circle?
How to detect a circle motion with UIGestureRecognizer
How to detect circular gesture via Gesture Recognizer?
所有链接的问题都包括已接受的答案。
【讨论】: