@protocol UIGestureRecognizerDelegate <NSObject>
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
// UITableView点击事件被手势截取
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
return NO;
// 手势&按钮的冲突
}else if ([touch.view isKindOfClass:[UIButton class]]){
return NO;
}
return YES;
}
网友评论