Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 759 Bytes

iOS_InteractivePopGestureInvalid.md

File metadata and controls

19 lines (15 loc) · 759 Bytes
title
系统横向侧滑返回失效

系统横向侧滑返回失效问题

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    // iOS横向滚动的scrollView和系统pop手势返回冲突的解决办法:     http://blog.csdn.net/hjaycee/article/details/49279951

    // 兼容系统pop手势 / FDFullscreenPopGesture / 如有自定义手势,需自行在此处判断
    if ([otherGestureRecognizer.view isKindOfClass:NSClassFromString(@"UILayoutContainerView")]) {
        if (otherGestureRecognizer.state == UIGestureRecognizerStateBegan && self.contentOffset.x == 0) {
            return YES;
        }
    }
}