- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
// 如果不可以交互 | 隐藏 | 透明度太小 3者任意一个都忽略不能点击
if(!self.userInteractionEnabled || self.hidden || self.alpha <= 0.01){
return nil;
}
UIView *view = [super hitTest:point withEvent:event];
if ([view isKindOfClass:[UICollectionView class]] ||
[view isKindOfClass:[orderDescCollectionViewCell class]]) {
return self;
}
return view;
}
网友评论