代码之家  ›  专栏  ›  技术社区  ›  d2kagw

将UIViewController显示为模态时隐藏UITabBar

  •  1
  • d2kagw  · 技术社区  · 16 年前

    我有一个UIViewController,它有一个模态窗口,我想在整个界面上显示它,包括UITabBar。

    UITabBarController (A) ->
        UIViewController (B) ->
            UINavigationController (C) ->
                UIViewController (D) ->
                    UIViewController (my modal view)
    

    我打电话的时候 presentModalViewController

    我试过设置 hidesBottomBarWhenPushed 属性到 YES

    1 回复  |  直到 16 年前
        1
  •  3
  •   codelark    16 年前

    模态 ViewController 必须是 TabBarController

    [self presentModalViewController:...];
    

    执行:

    [tabBarController presentModalViewController:...];
    

    如何维护对 选项卡控制器 随你。

    推荐文章