Note that there are some explanatory texts on larger screens.

plurals
  1. POiPad App behavior: a navigationcontroller with a tabbarcontroller with more tabs
    primarykey
    data
    text
    <p><strong>For the impatient:</strong> </p> <p>I want to have a navigationcontroller who's root viewcontroller is a tabbarcontroller, similar to the iPad application. I am using IOS 5 and Storyboards.</p> <p><strong>For the reading inclined:</strong></p> <p>In my storyboard I have 6 tabs in a UITabBarController that is embeded in a UINavigationController, giving it a "More" button after 3 tabs are shown.</p> <p>doing so gives me two navigation bars when more is pressed:</p> <p><img src="https://i.stack.imgur.com/O32x9.png" alt="double nav bar... what does it mean?!"></p> <p>So I subclass TabBarController:</p> <pre><code>//@implentation MyTabController - (void)viewDidLoad { self.moreNavigationController.wantsFullScreenLayout = NO; self.delegate = self; } - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { // hide nav bar if current controller is "More" controller self.navigationController.navigationBarHidden = viewController == self.moreNavigationController; } </code></pre> <p>Great, this gives me:</p> <p><img src="https://i.stack.imgur.com/yTeTs.png" alt="almost there"></p> <p>My guess was that i needed to relayout the views to account for the statusbar, so i try</p> <pre><code>[self.view setNeedsLayout:YES]; </code></pre> <p>but i get an error saying UIView does not contain a selector for setNeedsLayout so... How do I get the moreNavigationController.navigationBar to account for the statusbar?</p> <p><strong>Update</strong>:<br> I have a second related issue with this. When I hit the "Edit" button the edit controller shows modally. Its navigationbar displays <em>underneath</em> the insured controller (after an animation), and does not receive touches.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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