- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
//感觉collectionView有错@"CollctionCell"
if ([NSStringFromClass([touch.view class])isEqualToString:@"CollctionCell"] ) {
return NO;
}
if([NSStringFromClass([touch.view class])isEqual:@"UITableViewCellContentView"]){
return NO;//当触碰到TableView的Cell的ContentView手势事件不响应
}
return YES;
}
转载于:https://www.cnblogs.com/ios988/p/6866238.html