So I have a view in which it has some view which has a UITapGestureRecognizer on an image and I have a table view. The issue is that when I tap on a table view cell and the view which has a tap gesture recognizer on it is behind it, the action of that UITapGestureRecognizer is also executed. Question is how do I disable this so that when the table view didSelectRowAtIndexPath is executed the tap gesture recognizer action is not performed? By the way I have set :
tapGestureRecognizer.cancelsTouchesInView = NO;
I've also tried doing:
- (IBAction) handleTapGesture:(UITapGestureRecognizer *) sender {
if ([sender.view isKindOfClass:[TileViewController class]]){
NSLog(@"CANCEL THIS");
}
if ([sender.view isKindOfClass:[UITableView class]]){
NSLog(@"CANCEL THIS");
}
}
but it never went into the if statements