UIView 事件穿透

需要事件穿透的 View,实现方法

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
    UIView *hitView = [super hitTest:point withEvent:event];
    if(hitView == self){
        return nil;
    }
    return hitView;
}

你可能感兴趣的:(UIView 事件穿透)