让uiview可被点击事件穿透

在view的.m文件中

实现以下方法

- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event{

    UIView *hitView = [super hitTest:point withEvent:event];

    if(hitView == self){

        return nil;

    }

    return hitView;

}

猜你喜欢

转载自blog.csdn.net/u013857988/article/details/84990518