Created
February 22, 2016 09:32
-
-
Save acalism/c13d08957eebaa0d1798 to your computer and use it in GitHub Desktop.
gesture如何排除子view
This file contains 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
// 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