美文网首页
UIScrollview左右滑动和返回上一级的手势冲突

UIScrollview左右滑动和返回上一级的手势冲突

作者: 辛乐 | 来源:发表于2020-04-10 17:03 被阅读0次
        [_bigScrollView.panGestureRecognizer requireGestureRecognizerToFail:self.navigationController.interactivePopGestureRecognizer];
    
    
    //实际项目代码
    #pragma mark -- 左滑手势透传
    -(void)requirePopGesture{
        UIGestureRecognizer *gestureRecognizer = self.parentViewController.navigationController.interactivePopGestureRecognizer;
        if (gestureRecognizer) {
            gestureRecognizer.enabled = YES;
            [self.segmentContentView.panGestureRecognizer requireGestureRecognizerToFail:gestureRecognizer];
        }
    }
    

    相关文章

      网友评论

          本文标题:UIScrollview左右滑动和返回上一级的手势冲突

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