tableView collectionView 点击cell不
2016-07-26 本文已影响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;