user3808710
user3808710

Reputation: 27

UINavigationBar not showing, tried multiple fixes

This is really frustrating because no matter anything I do my Navigation Title will not appear at all. The view is even the root controller for the navigation Navigation Controller Connected to View Controller as Root View

I have tried the following:
Checking the box "Shows Navigation Bar" in Interface Builder.
Using the Simulated Metrics for a Navigation bar.
Programmatically Setting the Title, hidden to false.
Selecting the Navigation Item in the side and setting the title:

Setting the navigation title for the view controller.

I have tried and searched everything, even tried on different computers, new projects and all have ended up in runtime looking like this:

iOS Simulator Screenshot of no navigation bar.

Upvotes: 0

Views: 216

Answers (2)

Sudhin Davis
Sudhin Davis

Reputation: 2020

It seems that your initialViewController is not the UINavigationController, so the viewController containing that UIButton is just showing initially since it is initialViewController. It is clear from the picture.

enter image description here

So first of all select your UINavigationController and set it as the initialViewController in your storyboard. This modification can make you happy.. Sorry if you have already done it...

Upvotes: 1

Henrique Barros
Henrique Barros

Reputation: 868

In the storyboard you have to set its property "Is initial view controller" in the navigation controller Attributes Inspector.

Upvotes: 0

Related Questions