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

2020-04-10  本文已影响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];
    }
}
上一篇下一篇

猜你喜欢

热点阅读