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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:18:41+00:00 2026-06-06T07:18:41+00:00

I’m trying to add some navigation controller in my app, it’s sth likes: in

  • 0

I’m trying to add some navigation controller in my app, it’s sth likes:

in my index page view controller, I try to initialize the navigation controller like this:

-(void)viewDidLoad{
    ...
    //allocate a navigation controller.
    myNavigationController = [[UINavigationController alloc]init];
    myNavigationController.delegate = self;
    myNavigationController.navigationBar.hidden = YES;
    [self.view addSubview:myNavigationController.view];

    [myNavigationController pushViewController:tabViewController animated:YES];
    [self presentModalViewController:myNavigationController animated:YES];
}

Here, index page view controller is the root view controller of my app, it’s just a common UIViewController here.

[myNavigationController pushViewController:tabViewController animated:YES];

The tabViewController here I’ve pushed into the navigation controller is a custom tabview controller which makes use of a container view to hold the tab button and also holds an navigation controller for tab switching.

The problem here is:

myNavigationController.navigationBar.hidden = YES;

since I’ve make the navigation bar invisible, it doesn’t show when my custom view controller shows, but when I’d like to switch to some other view controller with the navigation controller and I also want the navigation bar visible:

myNavigationController.navigationBar.hidden = NO;
MyViewController *toSwitchNC = [[MyViewController alloc]init];
[myNavigationController pushViewController:toSwitchNC animated:YES]; 

The navigation bar would never show any more. I’ve also tried to put:

self.navigationController.navigationBar.hidden = NO

in MyViewController’s viewDidLoad, ViewDidAppear or even in the navigation controller’s delegate method, it didn’t show the navigation bar neither.

So what’s wrong with it? Why I initialized the navigation bar to be invisible at first, it will never show again even I set the hidden flag to be false?

  • 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-06T07:18:43+00:00Added an answer on June 6, 2026 at 7:18 am

    Okay, I’ve got this fixed by removing the navigation controller container in my index page view controller. This might be a stupid question, since apple’ve formally stated in the developer document that the navigation view controller should be place as root as possible in the view stack. Since IOS is a closed system, who knows WTH is going on under-beneath except Apple.

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I have some data like this: 1 2 3 4 5 9 2 6
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites 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.