IOS 手勢攔截

weixin_33936401發表於2017-05-16
-(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;
}

相關文章