written by http://stackoverflow.com/questions/16287963/navigation-bar-disappeared-from-my-storyboard-items
16 3 | 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! | ||
add a comment |
60 | 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. | ||||||||||||||||||||
|
6 | 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. |
I'm using Swift btw.
UPDATE:
Solved it by looking at the SWRevealViewController examples
So what happens is if you have a NavController -> VC set up, then by default there is a nav bar. It's inferring that there should be a nav bar, which is correct.
However, in the case that you're pushing from SWRevealVC and SWRevealVC is NOT in a Nav Controller, then when you push, it's inferring that there shouldn't be a nav bar. That's why it's disappearing. You can try to force it to have a nav bar by going to the VC and manually selecting what type of nav bar it should have. This should make it show in the storyboard. However, you'll have to also run code to see if it will actually show or not. If there is no nav bar when you run it, then you'll need to embed your SWRevealVC in a Nav Controller.
Also make sure that the navigation to that last view controller is a push and not a present.
'모바일개발(Mobile Dev) > IOS개발(ObjectC)' 카테고리의 다른 글
UILocalNotification (0) | 2016.01.18 |
---|---|
ABOUT startStepCountingUpdatesToQueue (0) | 2016.01.08 |
Background Mode (0) | 2015.12.30 |
The identity used to sign the executable is no longer valid at Xcode (0) | 2015.12.30 |
UIApplicationDidEnterBackgroundNotification UIApplicationWillEnterForegroundNotification (0) | 2015.12.27 |