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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:07:24+00:00 2026-05-28T14:07:24+00:00

using xcode 4.2 and iOS 5 and have nav bar on root controller and

  • 0

using xcode 4.2 and iOS 5 and have nav bar on root controller and four other views (inc UITable view) all i want is to hide nav bar in first root view controller and show in all other views…

Tried following

[self.navigationController setNavigationBarHidden:YES animated:animated];

No luck any ideas?

  • 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-28T14:07:25+00:00Added an answer on May 28, 2026 at 2:07 pm

    Use this code in your root controller (or all of your view controllers that you want to have a hidden navigation bar. see [1] though) in order to hide/show the navigation bar according to what you are aiming at:

    - (void)viewDidLoad {
       ...
      [self.navigationController setNavigationBarHidden:YES animated:NO];
       ...
    }
    
    - (void)viewWillAppear:(BOOL)animated {
        [self.navigationController setNavigationBarHidden:YES animated:animated];
        ....
     }
    
     - (void)viewWillDisappear:(BOOL)animated {
        [self.navigationController setNavigationBarHidden:NO animated:animated];
        ...
     }
    

    This is just a possible solution. You could well leave viewWillDisappear undefined in your non-root controllers and define viewWillAppear in your root controller… as you see it most convenient for you.

    [1] Hiding the navigation bar in anything but the root controller makes it possible to get stuck in the middle of your navigation hierarchy. Also it is against intuitive navigation in an iOS app to suddenly hide the navigation bar for anything else than the root view.)

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

Sidebar

Related Questions

I have a iPad 2 device with iOS version 5.0.1. I'm using Xcode 4.2
Recently, I have started using Xcode 4 for developing iOS apps. In Xcode intellisense's
I have been using XCode 3.2.4 when started developing iOS apps but now I
I have developing an iPhone application using xcode 4 which is compatible with iOS
I am using Xcode 4.1, on iOS Simulator 4.3 I have imported the ZXing
I'm working on some project for iOS 5 using Xcode 4.2. I have one
In my iOS project using Xcode 4.2, all targets are showing Latest iOS (iOS
I am developing an iOS app using XCode 4.2 I have a UIImage variable
I'm using xcode and I was wondering if there was a way to view
Currently, I have an iPhone app published in AppStore. I've developed it using XCode

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.