Created
September 4, 2013 08:00
-
-
Save 7gano/6434031 to your computer and use it in GitHub Desktop.
double tap!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UITapGestureRecognizer *doubleTapGestureRecognizer; | |
| doubleTapGestureRecognizer = [[UITapGestureRecognizer alloc] | |
| initWithTarget:self action:@selector(_doubleTapAction:)]; | |
| doubleTapGestureRecognizer.numberOfTapsRequired = 2; | |
| [cell addGestureRecognizer:doubleTapGestureRecognizer]; | |
| UITapGestureRecognizer *singleTapGestureRecognizer; | |
| singleTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_singleTapAction:)]; | |
| singleTapGestureRecognizer.numberOfTapsRequired = 1; | |
| [singleTapGestureRecognizer requireGestureRecognizerToFail:doubleTapGestureRecognizer]; | |
| [cell addGestureRecognizer:singleTapGestureRecognizer]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment