IOS 手势拦截

-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
    CGPoint point = [touch locationInView:self];
    BOOL inside = [self.collectionView pointInside:point withEvent:UIEventTypeTouches];
    if(inside && _isShow){
        return NO;
    }
    return YES;
}

你可能感兴趣的:(IOS 手势拦截)