Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pyanfield/9461550 to your computer and use it in GitHub Desktop.
Save pyanfield/9461550 to your computer and use it in GitHub Desktop.
resolve a conflict between tap gesture with table view didselected event
- (BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if ([gestureRecognizer isEqual:self.tapRecognizer]) {
// for ios 7 , need to compare with UITableViewCellContentView
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"] || [touch.view.superview isKindOfClass:[UITableViewCell class]]) {
return FALSE;
}
}
return TRUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment