hitTest

作者: 开发者老岳 | 来源:发表于2020-11-20 21:31 被阅读0次

按需求屏蔽事件,默认是返回[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