一、父類事件設置代理代理
UIGestureRecognizer *tapGesture 。。。事件
tapGesture.delegate = self;class
二、覆蓋方法方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
return NO;
}
return YES;
}touch