按需求屏蔽事件,默认是返回[super hitTest:point withEvent:event]
,若想某个区域无事件,则返回 nil
。
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
if (xxx) {
return nil;
}
return [super hitTest:point withEvent:event];
}
按需求屏蔽事件,默认是返回[super hitTest:point withEvent:event]
,若想某个区域无事件,则返回 nil
。
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
if (xxx) {
return nil;
}
return [super hitTest:point withEvent:event];
}
本文标题:hitTest
本文链接:https://www.haomeiwen.com/subject/srmjiktx.html
网友评论