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 3394672
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:11:53+00:00 2026-05-18T04:11:53+00:00

I have the following in the mainwindow.xib Navigation Controller List item Tab bar controller

  • 0

I have the following in the mainwindow.xib

  1. Navigation Controller
    • List item
  2. Tab bar controller
    • tabbar
    • firstViewController
    • SecondViewController

The entrypoint

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    navController.viewControllers = [NSArray arrayWithObject:tabBarController];
    [window addSubview:navController.view];
    [window makeKeyAndVisible];
    return YES;
}

and now in the first viewcontroller i’m writing

-(void)loadView
{
    if(rootAppDelegate==nil)
        rootAppDelegate=(tabbarAppDelegate *) [[UIApplication sharedApplication]delegate];

    listEmergencyItems= rootAppDelegate.listOfEmergencySectionItems;
    self.rootAppDelegate.navController.navigationBarHidden = NO;
    [super loadView];
}

and in the second viewcontroller i’m writing

- (void)loadView
{    
    if(rootAppDelegate==nil){
        rootAppDelegate=(tabbarAppDelegate *) [[UIApplication sharedApplication]delegate];
    }
    listHospitalsItems= self.rootAppDelegate.listOfHospitalsItems;
    self.rootAppDelegate.navController.navigationBarHidden = YES;
    [super loadView];
}

And on the runtime, when it first loads the first view, i see the navigationbar where i need to navigate into a detail view.
And when i press the second tab bar item, i go to the second view, and the navigation bar gets hidden.
But when i press back on the first tabbar item, i.e. returning to the first viewcontroller. the navigation bar remains hidden.

Any idea?

  • 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-05-18T04:11:54+00:00Added an answer on May 18, 2026 at 4:11 am

    The navigation bar won’t show in the second view because neither view was placed on the navigationcontroller’s stack. you want to use something like this in the parent to present a child view instead of overriding loadView

        ViewToPresentViewController *myVController = [[ViewToPresentViewController alloc] initWithNibName:@"ViewToPresentViewController"
                                                                                                                    bundle:nil];
                myVController.property = someValue;
        [self.navigationController pushViewController:myVController
                                                     animated:YES];
        [myVController release];
    

    then, as i said previously, you can just use [self.navigationController setNavigationBarHidden:animated:]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Description I have a Tab Bar Controller with a navigation controller tab. The first
I have a tab bar controller (its a tab bar based application, so tab
I have the following delegate files. My AboutViewController in MainWindow.xib loads the AboutViewController.xib and
I have a UITabBarController in my MainWindow.xib. Each tab contains a UINavigationController which has
I have an iPhone application that's using Navigation Controller to display the top bar
I have the following dependency property in my MainWindow class (inherits from WPF's Window)
I have the following code: <Window x:Class=kkk.MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=MainWindow Height=350 Width=525> <Window.Resources> <Style
I have following nested objects. I am using @Valid for validation in my controller.
I have following code public partial class MainWindow : Window { public MainWindow() {
I have the following keybindings in my MainWindow: <KeyBinding Command={Binding OpenCommand} Gesture=Ctrl+O/> <KeyBinding Command={Binding

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.