Forked from pyanfield/resolve a conflict between tap gesture with table view didselected event.m
Created
September 14, 2018 08:36
-
-
Save fabiosoft/338454cd3d217edf6375767b703d608a to your computer and use it in GitHub Desktop.
resolve a conflict between tap gesture with table view didselected event
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
- (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