Skip to content

Instantly share code, notes, and snippets.

@sprhawk
Created August 30, 2012 06:49
Show Gist options
  • Save sprhawk/3523472 to your computer and use it in GitHub Desktop.
Save sprhawk/3523472 to your computer and use it in GitHub Desktop.
UIGestureRecognizer
if (UIGestureRecognizerStateRecognized == gesture.state) {
}
在识别touch时忽略掉某些子view的response
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if ([touch.view isDescendantOfView:loginButton]) {
return NO;
}
else if ([touch.view isDescendantOfView:tempCloseButton]) {
return NO;
}
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment