[英]Hiding UITabBar when showing UIViewController as modal
我有一個UIViewController,它具有一個模態窗口,我想在整個界面(包括UITabBar)上進行呈現。
我的應用程序層次結構是這樣的:
UITabBarController (A) ->
UIViewController (B) ->
UINavigationController (C) ->
UIViewController (D) ->
UIViewController (my modal view)
當我在D上調用presentModalViewController
時,模態視圖將顯示在UITabBar的下面,或者應該說UITabBar仍然顯示。
我試過在模態視圖控制器hidesBottomBarWhenPushed
屬性設置為YES
,但無濟於事。
有什么想法為什么對我不起作用?
模態ViewController
必須是TabBarController
的直接子代才能執行所需的操作。
在ViewController“ D”中,而不是:
[self presentModalViewController:...];
做:
[tabBarController presentModalViewController:...];
如何維護對TabBarController
的引用取決於您。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.