Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigation bar disappeared from my storyboard items

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!

like image 925
Tom Avatar asked Apr 29 '13 20:04

Tom


People also ask

How do you add navigation to a storyboard?

Go to the Storyboard. Select the View Controller and in The Editor menu select Embed in -> Navigation Controller. Next, drag a Bar Button from the Object Library to the left side of the Navigation Bar and name it "Left Item". Repeat this for the right side and name it "Right Item".

How do I embed navigation controller in storyboard?

In your storyboard, select the initial view controller in your hierarchy. With this view controller selected, choose the menu item Editor -> Embed In -> Navigation Controller .

How do I add back button to navigation bar storyboard?

Storyboard. You can also set this in the Storyboard. Select UINavigationBar and select the Attributes Inspector tab. Then you can change those two images under Back and Back Mask attributes.


1 Answers

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.

like image 155
csundman Avatar answered Oct 06 '22 10:10

csundman