Navigation stack becomes unusable after canceling iOS 7 back swipe gesture

后端 未结 5 1194
长发绾君心
长发绾君心 2020-12-13 19:02

I am running into an issue where my navigation controller becomes unusable after initiating then canceling the new iOS 7 back swipe gesture.

Some relevant informatio

5条回答
  •  执念已碎
    2020-12-13 19:39

    Its will help you to avoid freezing the app.

    - (void)navigationController:(UINavigationController *)navigationController
           didShowViewController:(UIViewController *)viewController
                        animated:(BOOL)animate
    {
        if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)])
        {
            if (self.navigationController.viewControllers.count > 1)
            {
                self.navigationController.interactivePopGestureRecognizer.enabled = YES;
            }
            else
            {
                self.navigationController.interactivePopGestureRecognizer.enabled = NO;
            }
        }
    }
    

提交回复
热议问题