Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I was printing the list of points I get using this two methods of touch tracking.

The gesture recognisers are easier to use, but if you compare the points you get with the touchesBegan procedure, recognisers avoid some points, specifically at the beginning of the motions.

Does anybody know if there is a difference regarding accuracy between this two procedures?

Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
573 views
Welcome To Ask or Share your Answers For Others

1 Answer

I believe gesture recognizers would need some time initially to assert that it has detected the correct gesture. For example, if we do a swipe gesture, ios would first wait to confirm that it was not a tap gesture.

Hence, gesture recognizers may not be printing the points at the beginning of the motion.

As mentioned on developer documentation here:

Gesture recognizers may delay the delivery of touch objects to the view while they are recognizing gestures, and by default they cancel delivery of remaining touch objects to the view once they recognize their gesture.

A helpful detailed example can be found at this link.

Hope this helps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...