ios 解决UITableViewCell手势冲突

- (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;
}

posted on 2017-05-17 10:28  我就是一种相逢  阅读(465)  评论(0编辑  收藏  举报

导航