1、父类事件设置代理
UIGestureRecognizer *tapGesture 。。。
tapGesture.delegate = self;
2、覆盖方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
return NO;
}
return YES;
}
TableView didSelectRowAtIndexPath 不执行
原文:http://www.cnblogs.com/ygm900/p/5521529.html