美文网首页
tableView collectionView 点击cell不

tableView collectionView 点击cell不

作者: 陈鸿禧 | 来源:发表于2016-07-26 12:34 被阅读439次

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { DDLogError(@"touch %@ %@",NSStringFromClass([touch.view class]),NSStringFromCGRect(touch.view.frame)); if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"] || [NSStringFromClass([touch.view class]) isEqualToString:@"UserCollectionViewCell"]) { return NO; } return YES;}

collectionView 依然不响应

在CollectionViewCell中
self.contentView.userInteractionEnabled = NO;

相关文章

网友评论

      本文标题:tableView collectionView 点击cell不

      本文链接:https://www.haomeiwen.com/subject/blpnjttx.html