美文网首页
继承NavigationController时,偶现Push卡死

继承NavigationController时,偶现Push卡死

作者: 楠若寺 | 来源:发表于2018-05-16 13:25 被阅读0次

    继承了NavigationController,但是Push VC时有时会卡死,但是可以手势滑动。

    解决方案:
    @interface ZZBaseNaviController () <UINavigationControllerDelegate>
    @end
    @implementation ZZBaseNaviController

    • (void)viewDidLoad {
      [super viewDidLoad];

      self.delegate = self;
      }

    pragma mark - UINavigationControllerDelegate

    • (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
      self.interactivePopGestureRecognizer.enabled = [self.viewControllers count] > 1;
      }
      @end

    相关文章

      网友评论

          本文标题:继承NavigationController时,偶现Push卡死

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