解决Scrollview,collectionview 等与UI
2019-10-28 本文已影响0人
Bruin_熊先森
-(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event{
UIView*view = [superhitTest:pointwithEvent:event];
if([view isKindOfClass:[UISlider class]]){
//如果响应view是UISlider,则scrollview禁止滑动
self.delayCollectView.scrollEnabled = NO;
}else{//如果不是,则恢复滑动
self.delayCollectView.scrollEnabled = YES;
}
returnview;
}