UICollectionView uiscrollview等与u
作者:
moodi | 来源:发表于
2018-04-10 14:47 被阅读0次
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event;
//recursively calls -pointInside:withEvent:. point is in the receiver's coordinate system
- (BOOL)pointInside:(CGPoint)point withEvent:(nullable UIEvent *)event;
// default returns YES if point is in bounds
-(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
UIView *result = [super hitTest:point withEvent:event];
if([result isKindOfClass:[UISlider class]] || [result isKindOfClass:[UIButton class]] || [result isKindOfClass:[UISwitch class]]){
_contentView.scrollEnabled = NO;
}else{
_contentView.scrollEnabled = YES;
}
return result ;
}
本文标题:UICollectionView uiscrollview等与u
本文链接:https://www.haomeiwen.com/subject/ksfnhftx.html
网友评论