Note that there are some explanatory texts on larger screens.

plurals
  1. POHidden UINavigationController inside UITabBarController
    text
    copied!<p>I have an application with 5 <code>UIViewController</code>s each inside a corresponding <code>UINavigationController</code>, all tucked inside a <code>UITabBarController</code> that displays 5 tabs at the bottom of the screen.</p> <p>I want to display another <code>UIViewController</code> (inside a <code>UINavigationController</code>) when a dialog button is pressed.</p> <p>This view should only be loaded and unloaded programatically; i.e. it should not appear in the tab bar. However, I want the tab bar to be visible always.</p> <p>If I add the <code>[UINavigationController view]</code> to <code>[self window]</code> the <code>UITabBar</code> is covered. If I add it to any other layer, the <code>UINavigationController</code> adds on the compensation it has for the status bar so appears further down than expected.</p> <p>A solution would be to have the 6th <code>UINavigationController</code> added to the <code>UITabBar</code> with the others, but with its <code>tabBarItem</code> hidden. Then I can show it and hide it using the <code>tabBar</code>s <code>selectedIndex</code> property.</p> <p>Accessing the <code>tabBarItem</code> through the <code>UIViewController</code> shows no obvious way of doing this.</p> <hr> <p>@wisequark, I think you completely misunderstood and you have almost rewritten the architecture of my application. However I have a separate navigation controller for each view as they are mutually exclusive and there is no concept of "drilling down".</p> <p>@Kendall, This is what I expect I will have to do - have the modal view appear with a hide button to bring back the normal interface. But it would be nice to keep the tab bar always visible, so I was just wondering if anyone knew of a way.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload