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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:22:23+00:00 2026-06-06T06:22:23+00:00

I found the hard way that navigationController.navigationBarHidden = NO; and navigationController.navigationBar.hidden = NO; are

  • 0

I found the hard way that

navigationController.navigationBarHidden = NO;

and

navigationController.navigationBar.hidden = NO;

are not the same thing. In fact, if I use the first syntax to hide the nav bar, then I cannot use the second syntax to show it: it simply won’t do anything. Moreover, the first syntax to show/hide the nav bar always works for me, while the second syntax works some times, but not always. I haven’t been able to determine exactly when it would work and when not.

As I was stuck with fixing somebody else’s code (a reasonably large app: over 20 UIViewControllers), I had to do a global search for navigationBar.hidden and replace it with navigationBarHidden. After that, I had to do a global search for navigationBar setHidden: and replace with navigationBarHidden syntax. This eventually fixed the issue.

Yet, I want to understand why the two different options are provided and what the real difference between them is.

  • 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-06T06:22:25+00:00Added an answer on June 6, 2026 at 6:22 am

    navigationBarHidden applies an animation when hiding or showing the navBar duration of this navigation could be set by using UINavigationControllerHideShowBarDuration

    Where navigationBar.hidden will directly change the visiblity status of the UINavigationBar (which is a subclass of UIView)

    Since UINavigationBar is a subclass of UIView it inherited the hidden bool property, no way of changing it to protected or private

    From apple docs

    The navigation controller is responsible for managing the
    configuration and display of the navigation bar and navigation
    toolbar. You must never modify these views directly. Instead, you
    should manipulate them through the methods and properties of the
    UINavigationController class. You can hide and show the navigation bar
    using the navigationBarHidden property or
    setNavigationBarHidden:animated: method.

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

Sidebar

Related Questions

I found it very hard to customize PDF invoice that Magento use. Not only
I've found out the hard way that my website can be hacked by passing
I found, the hard way , that at least boost::program_options is dependent of the
I just found out the hard way that srand(1) resets the PRNG of C(++)
After having learnt the hard way that shared variables are currently not guarded by
Recently I found out the hard way that to convert between LatLngs and pixel
I have found out (in a hard way) that a collection that is being
Found this question that explained a way to communicate between layers. However there is
I just discovered (the hard way) that if you deploy your application to a
From hard experience I've found it useful to occasionally save the state of my

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.