Skip to content

Instantly share code, notes, and snippets.

@7gano
Created September 4, 2013 08:00
Show Gist options
  • Select an option

  • Save 7gano/6434031 to your computer and use it in GitHub Desktop.

Select an option

Save 7gano/6434031 to your computer and use it in GitHub Desktop.
double tap!
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