首页 文章

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

提问于
浏览
0

我有一个UITabBarController有5个选项卡 . 每个都有一个UINavigationController .

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

但我想知道是否有可能让UITabBar上方的UIViewController?

知道怎么样?

编辑:

这是结构

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

所以每次NavigationController推送一个Uiviewcontroller . UITabBar的位置仍然被UITabBar阻止,因为它低于它 .

如何让TabBar上方的UIViewController?

1 回答

  • 2

    你能尝试这样做,看看它是否有效?

    destinationController.hidesBottomBarWhenPushed = true
    

    在您进入目标视图控制器之前执行此操作 .

    希望这可以帮助 .

相关问题