How to Fix iOS Navigation Bar Not Showing in Xcode
Navigation Bar Disappeared?
One day, when I opened my project in Xcode, the Navigation Bar color that had always been displayed was gone, and the bar itself was no longer showing.
After checking, I found that this was due to a change in the default transparency settings for the navigation bar in iOS 15.
Here, I'll explain how I restored the navigation bar in the storyboard to look the same as it did in iOS 14.
How to Fix When the Navigation Bar Doesn't Show
First, open your project in Xcode and select the Navigation Bar of the Navigation Controller in the storyboard.
In this iOS app, the navigation bar's background color was set to a reddish color, and the title font color was set to white with Verdana Bold 20.0.
Looking at the previous values in the Attributes inspector, it looked like this:
Previously, setting Bar Tint, Title Font, and Title Color was enough for the changes to be applied to the navigation bar.
In iOS 15, to make the navigation bar look the same as before, first go to the Attributes inspector and select both Standard and Scroll Edge under Appearances.
Then, in Standard Appearance, set the background color under Background, and specify the title font and color under Standard Title Attributes.
Likewise, in Scroll Edge Appearance, set the Background and Scroll Edge Title Attributes with the same values as in Standard Appearance.
With this, the navigation bar now looks the same as it did before.
That's how to fix the issue when the Navigation Bar is not showing.