Navigation bar disappeared from my storyboard items

32,634

Solution 1

Try this:

Select the view controller with the missing navigation bar and view the attributes inspector (This is the fourth tab over in the right side window). Under the simulated metrics section, change the "Top Bar" from the default "inferred" to "Navigation Bar".

Hopefully that solves your problem.

Solution 2

Specifically for xcode 6, under the simulated metrics section (fourth tab on the right window), under the "Top View" dropdown, pick the "Translucent Navigation Bar" to get the default nav bar.

Solution 3

For me I just command-A and copy, delete all view controllers, then paste back in, and it worked.

Solution 4

I had a similar problem when I changed "is initial view controller" from one view/navigation controller to another within the main storyboard. I, in error, set the view controller and not the navigation controller as initial view controller. Wasted a fair bit of time on a simple mistake.

Share:
32,634

Related videos on Youtube

Tom
Author by

Tom

Updated on July 09, 2022

Comments

  • Tom
    Tom almost 2 years

    From one day to another the navigation bar disappeared from my storyboard items in XCode 4.6.2. I can't restore them (cleaning, rebuilding, closing, reopening etc)

    When running my app on my device or in simulator, everything works ok, the navigation bar is there. But I need them on my storyboard during design time, I have buttons, labels there those must be changed now. (pls. don't advise to do it from code, I want to do it on the storyboard graphically, I think that's why it is there)

    How can I get my navigation bars back? I hope the solution won't be to delete/do them again as I read in some places, because I have dozens of navigation controllers.

    Thanks in advance!

  • Tom
    Tom almost 11 years
    Thanks my friend. It works. But why did it disappear? So far it worked by inferred mode.
  • csundman
    csundman almost 11 years
    There might be multiple navigation controllers that lead to that particular view controller, or perhaps even a container view? XCode can get pretty finicky in these cases since inferred doesn't always know which direction it's coming from. I've noticed a lot of unpredictable behavior with inferred and have many of view controllers specified as I described. I suppose that's why the functionality is there.
  • Luca Detomi
    Luca Detomi over 8 years
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. - From Review
  • Jeremy Andrews
    Jeremy Andrews over 8 years
    I know its not a coding answer but it is a very simple mistake one can make on Xcode - so - I believe it is an answer that help save time.
  • Abuzar Amin
    Abuzar Amin about 8 years
    After doing this still navigation bar is not showing. Navigation bar is not showing in complete application. Although my views are embeded in UINavigationController
  • Jeff
    Jeff almost 7 years
    I had several segues going to the same viewController. This views nav bar was already set to inferred. So I set the nav bar to transparent black, did what I needed to do and set it back to inferred. I would call this a bug but probably not considering my configuration.
  • MSurrow
    MSurrow almost 7 years
    The glory of SO - your three lines helped me a lot 4 years later. Thank you. I needed to do this after I deleted a view that was originally Embedded in the Navigation Controller, but I then later had to replace the view with another type of view (delete + create new). The nav bar was showing in the app but not in the storyboard. (writing this so other people with same issue might easier from google, since it wasn't exactly the first hit). Navigation bar disappeared after creating new view for Navigation controller.
  • Admin
    Admin over 2 years
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.