Skip to content

Instantly share code, notes, and snippets.

@acalism
Created February 22, 2016 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acalism/c13d08957eebaa0d1798 to your computer and use it in GitHub Desktop.
Save acalism/c13d08957eebaa0d1798 to your computer and use it in GitHub Desktop.
gesture如何排除子view
// http://stackoverflow.com/a/18886352/1107242
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if (touch.view != _mySuperView) { // accept only touchs on superview, not accept touchs on subviews
return NO;
}
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment