需要事件穿透的 View,实现方法
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView *hitView = [super hitTest:point withEvent:event];
if(hitView == self){
return nil;
}
return hitView;
}
需要事件穿透的 View,实现方法
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView *hitView = [super hitTest:point withEvent:event];
if(hitView == self){
return nil;
}
return hitView;
}
本文标题:UIView 事件穿透
本文链接:https://www.haomeiwen.com/subject/utzbxftx.html
网友评论