重写这个 方法 实现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;
}
本文标题:可以穿透点击事件的View
本文链接:https://www.haomeiwen.com/subject/bzrdgxtx.html
网友评论