user339946
user339946

Reputation: 6119

Using pan gesture, ignore touches after single touch?

I'm using a pan gesture to move around an image. You touch down, drag, and when you release it it will snap back into a position. Everything works great, however I'd like to polish it up by making the interaction tighter.

I noticed that if you drag, and then drop another finger down on the image, and then release the original finger, you can continue to access the pan gesture. The second finger basically takes over from the first.

I don't want this because it messes with my user experience and the way my program works.

So basically I want to ignore any other touches on the object after they access the pan gesture. Perhaps it would be better to use touchesMoved rather than a pan gesture? Or is there some setting I can use? Any help appreciated. Thanks

Upvotes: 0

Views: 513

Answers (1)

jsd
jsd

Reputation: 7693

Try setting the maximumNumberOfTouches property on the UIPanGestureRecognizer to 1.

Upvotes: 1

Related Questions