美文网首页
手势&冲突

手势&冲突

作者: 峰远 | 来源:发表于2016-12-14 11:17 被阅读0次
    @protocol UIGestureRecognizerDelegate <NSObject>
    
    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
    
        // UITableView点击事件被手势截取
        if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
            
            return NO;
        //  手势&按钮的冲突
        }else if ([touch.view isKindOfClass:[UIButton class]]){
        
            return NO;
        }
        return  YES;
    }

    相关文章

      网友评论

          本文标题:手势&冲突

          本文链接:https://www.haomeiwen.com/subject/gcjimttx.html