在 UINavigationController 下使用 UITableViews 导航 3 层深度后,最终呈现一个 UIViewController,它调用:
[self.navigationController popViewControllerAnimated:YES];
我看到这个结果,它是 UINavigationBar 覆盖在 UITableView 之上。
如何修复仅在弹出 View 后发生的叠加?
部署目标 6.0
我见过几个听起来类似的问题,但不完全是这种情况,也没有答案。
顺便说一句:使用导航栏后退按钮不会导致此行为。
最佳答案
当从 UINavigationController 中弹出多个 View 时,我发现 View 必须完全加载,否则 UI 会变得困惑并显示奇怪。因此,就我而言,我添加了一个检查并在加载后弹出 View 。
- (void) viewDidAppear:(BOOL)animated {
if (self->doPopView) {
[self.navigationController popViewControllerAnimated:YES];
} else {
// ...
}
}
此方法解决了 UINavigationController 与 UITableView 显示问题。
关于ios - popViewControllerAnimated 之后 UINavigationBar 下的 UITableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14964136/