Reputation: 131
I don't know why but my navigation bar is missing from my ios simulation.
Anybody know where might be the problem?
Yes I have "Shows Navigation bar" and I don't have any warnings.
I wanted to try "Update frames" but I don't have this option available.
I am using Xcode 7.3 and Swift.
Thank you
Upvotes: 3
Views: 4326
Reputation: 81
I had the same problem: the navigation bar was showing on the root view in Storyboard, but when running the Simulator - there was no navigation bar at the top of the views. This solved it:
Navigation Controller > Navigation Bar > UNCHECK Translucent (it is checked by default). This did two things:
Upvotes: 0
Reputation: 7602
There are two possibilities.
1) May be you didn't Embeded navigationcontroller before your viewcontroller. so, add Navigation controller with go to
Editor -> Embededin -> Navigation controller.
2) If you have add navigation controller but May be you have set NONE as topbar of Viewcontroller.
Upvotes: -1
Reputation: 30
Its depend how to embedding navigation controller but you can try to embedding navigation controller following below way and than run application and check in simulator : Go to Editor in xcode -> Embed in -> Navigation Controller.
Upvotes: 0
Reputation: 17481
As other people have said in the comments without showing some code or screenshot of IB it's hard to find out where the problem is... But here's some things to checkout.
Are you sure your view controller is embedded in a UINavigationController
?
If you are using Storyboards you should have something like this:
In code instead you might have set the window.rootViewController
property in the AppDelegate
to the content view controller rather than the navigation controller which is supposed to contain it.
Upvotes: 1