所以当我调用按钮函数并在导航中推送一个新 View 时。
[self.navigationController pushViewController:newviewcontroller animated:YES];
但是,如果我在 View 向左滑动之前向后滑动 View 。它将使应用程序崩溃并显示以下消息:
nested pop animation can result in corrupted navigation bar
Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
这是我将手势与委托(delegate)连接的代码。
-(void)viewDidAppear:(BOOL)animated{
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7")) {self.navigationController.interactivePopGestureRecognizer.delegate = self;}
}
除了简单地删除该行之外,我还能如何解决这个问题?这是 iOS 7 的错误吗?
我可以在动画加载后启用手势吗?
最佳答案
iOS 7: Interactive Pop Gesture With Custom Back Button - 这是这个问题的解决方案。
关于iOS 7 navigationController 导航返回错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20422864/