Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8088909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:13:51+00:00 2026-06-05T19:13:51+00:00

For the impatient: I want to have a navigationcontroller who’s root viewcontroller is a

  • 0

For the impatient:

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.

For the reading inclined:

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.

doing so gives me two navigation bars when more is pressed:

double nav bar... what does it mean?!

So I subclass TabBarController:

//@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;
}

Great, this gives me:

almost there

My guess was that i needed to relayout the views to account for the statusbar, so i try

[self.view setNeedsLayout:YES];

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?

Update:
I have a second related issue with this. When I hit the “Edit” button the edit controller shows modally. Its navigationbar displays underneath the insured controller (after an animation), and does not receive touches.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:13:54+00:00Added an answer on June 5, 2026 at 7:13 pm

    Pushing a tabBarController into a NavController isn’t recommended, instead set a NavigatorController for every tabBar View controller, and set the TabBarController as the main window root view controller.

    If you want to be able to show a screen before showing the tabbar, a solution is to push in all the navigator controllers the previous view controller, followed by the one you want to show (that way all navbars has the backbutton). Then set hidesBottomBarWhenPushed = YES to the first view controller, that way it won’t show the tabBar.

    Example Code:

    UIViewController *prevc = [[UIViewController alloc] init];
    //prevc.hidesBottomBarWhenPushed = YES;
    
    //Do this for every VC that will be a tabBarItem
    UIViewController *vc1 = [[UIViewController alloc] init];
    UINavigationController *nv1 = [[UINavigationController alloc] initWithRootViewController:prevc];
    [nv1 pushViewController:vc1 animated:NO];
    
    //Remember to set the tabBarItem!
    
    UITabBarController *tb = [[UITabBarController alloc] init];
    tb.viewControllers = [NSArray arrayWithObjects:nv1, nv2, nv3, nil];
    

    I just realized that setting hidesBottomBarWhenPushed to the previous ViewController won’t work well, but If you show prevc first, and then push the following viewController, you won’t have problems. But if anyway you wan’t to hide the tab bar while doing a pop, please check this:

    • hidesBottomBarWhenPushed but when popped
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a few multimillion lined text files located in a directory, I want
I have a web application which enables users to upload files. The files are
I am just starting with Caliburn Micro. I want to have a combo box
i have tomcat server that holds web application i like to be able to
To prevent impatient users from clicking on a link to a webstart application too
I keep getting duplicate entries in my database because of impatient users clicking the
While going through the book Scala for the Impatient , I came across this
Possible Duplicate: Decreasing for loop in Scala? While working through [Scala For The Impatient][1],
While working my way through Cay S. Horstmann's Scala for the Impatient, I noticed
I asked this at the GWT forum but I'm impatient for the answer and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.