ios - popViewControllerAnimated 之后 UINavigationBar 下的 UITableView

标签 ios uitableview ios6 uinavigationcontroller

在 UINavigationController 下使用 UITableViews 导航 3 层深度后,最终呈现一个 UIViewController,它调用:

[self.navigationController popViewControllerAnimated:YES];

我看到这个结果,它是 UINavigationBar 覆盖在 UITableView 之上。

enter image description here

如何修复仅在弹出 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/

相关文章:

ios7 - 我应该在 "Architectures"部分的 Xcode build设置中包含什么

ios - iOS 崩溃报告中的 "SIMULATED (this is NOT a crash)"是什么意思?

ios - %@ 的超链接在 iOS 上不起作用

ios - 如何在 swift3 的 UILabel 中获取 JSON 数据

ios - Xcode 9.0 在 XIB 中更改 tableView 样式时卡住,为什么?

ios - uitablviewcell 动态高度与 systemLayoutSizeFittingSize 不正确

ios - 将坐标(纬度、经度)附加到墙柱(iOS SDK)

ios - TableView 的单元格未显示

ios - 未触发 Unwind segue

ios6 - GKPlayer 的 GKLocalPlayer 的 displayName 总是 "Me"吗?