重写导航控制器,在其代理实现:
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated { BOOL isRootVC = viewController == navigationController.viewControllers.firstObject; navigationController.interactivePopGestureRecognizer.enabled = !isRootVC; }
参考各位前辈的分析:
http://stackoverflow.com/questions/21221581/ios-7-interactivepopgesturerecognizer-is-freezing-app
http://www.trsjdc.com/320/#more-320
http://zhangmingwei.iteye.com/blog/2080457
时间: 2024-10-12 08:46:48