父类不传递事件给子类

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
    if ([touch.view isDescendantOfView:self.subView]) {
        return NO;
    }
    return YES;
}

你可能感兴趣的:(父类不传递事件给子类)