开发者

Is there a way to detect non-movement (touch events)?

Is there a way to detect a finger's non-movement by using a combination of UITouch events? The event methods touchesEnded and touchesCancelled are only fired when the event is cancelled or the finger lifted. I would like to know when a touch has stopped moving,开发者_JAVA百科 even while it is still touching the screen.


Simply use the following UITouch property:

UITouchPhase phase;

if its value is UITouchPhaseStationary, then the finger has not moved on the screen since the last event received. This implies that you get the related touch in

touchesBegan:withEvent:

and then the user simply does not move his/her finger.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜