Chen Lu Chen Lu - 1 year ago 61
iOS Question

How to differentiate single tap gesture and double tap gesture?

I add both single and double tap gestures to one

, then the problem is every time I tried to double tap, it executed single tap's

How can I get rid of this problem?

Answer Source

You maybe need requireGestureRecognizerToFail: method. Something like this:

[singleTapRecognizer requireGestureRecognizerToFail:doubleTapRecognizer];