Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

禁止滑动返回属性设置无效 #171

Open
guojichao opened this issue Jun 1, 2022 · 0 comments
Open

禁止滑动返回属性设置无效 #171

guojichao opened this issue Jun 1, 2022 · 0 comments

Comments

@guojichao
Copy link

禁止滑动返回属性设置 没有效果是什么情况呢

  • (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
    if (self.nav.viewControllers.count > 1) {
    // 先判断hbd_swipeBackEnabled再判断hbd_backInteractive,
    // 可以解决当用户已经将hbd_swipeBackEnabled设置为NO时,并且重写了hbd_backInteractive的getter方法,用手势返回时,先调用hbd_backInteractive的getter方法的问题
    // 应该是已经将hbd_swipeBackEnabled设置为NO后,用户再进行侧滑手势时,不触发任何操作。
    return self.nav.topViewController.hbd_swipeBackEnabled && self.nav.topViewController.hbd_backInteractive;
    }
    return NO;
    }

这个方法不走

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant