Prevent UIGestureRecognizer from firing selector more than once

Posted by JK on Stack Overflow See other posts from Stack Overflow or by JK
Published on 2010-05-06T18:21:28Z Indexed on 2010/05/06 18:28 UTC
Read the original article Hit count: 453

Filed under:
|

I utilize a UILongPressGestureRecognizer in my app. This is a continuous gesture recognizer which means it continuously fires the selector for the target it was initialized with. I would like the selector to be fired only once. I have tried to prevent further selectors being fired by setting the gesture recognizer's enabled property to Note the first time the selector is fired, but this only takes effect after the selector is fired again. How can I ensure the selector is fired only once?

© Stack Overflow or respective owner

Related posts about ipad

Related posts about cocoa-touch