ios - UITabBarController 的 TabBar 阻塞了由它托管的 UINavigationController 推送的 UIViewController

标签 ios swift uinavigationcontroller uitabbarcontroller

我有一个 UITabBarController,它有 5 个选项卡。每个都有一个 UINavigationController。

除了每次这些 UINavigationController 中的每一个都推送一个 ViewController 之外,一切都运行良好。它们的底部被 UITabBar 挡住了。这是正常的。

但我想知道是否可以将 UIViewController 置于 UITabBar 之上?

知道怎么做吗?

编辑:

结构如下

UITabBarController
    Tab 0: UINavigationController
    Tab 1: UINavigationController
    Tab 2: UINavigationController
    Tab 3: UINavigationController
    Tab 4: UINavigationController

所以每次 NavigationController 推送一个 Uiviewcontroller。 UIViewController 位置仍然被 UITabBar 阻挡,因为它在它下面。

如何让 UIViewController 位于 TabBar 上方?

最佳答案

你能试试看是否可行吗?

destinationController.hidesBottomBarWhenPushed = true

在进入目标 View Controller 之前执行此操作。

希望这对您有所帮助。

关于ios - UITabBarController 的 TabBar 阻塞了由它托管的 UINavigationController 推送的 UIViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31869338/

相关文章:

ios - 从 UICollectionView 的一个部分中删除一行似乎不会删除关联的标题

iphone - UIViewController 或 UINavigationController 是否设置其 View 的大小?

ios - 如何使用工具栏按钮创建导航

ios - 在 IOS/iPad 中创建弹出窗口

ios - Xcode 8.1 beta 连接不可用

iphone - 发生异常时的文件名和行号

swift - 如何从 swift 3 将 x-www-form-urlencoded 发布到 REST api

ios - Xamarin.iOS/Akavache/加密缓存工作示例

swift - 在 Swift 中对字典进行排序

ios - 在导航 Controller 中设置后退按钮的 Action