I am trying to add navigation to my iOS app. I am simulating an iPhone 15 with iOS 17 on Xcode 15 and Swift 5.8.
I have seen in several tutorials that when Navigation Controller is added to storyboard via Editor -> Embed in -> Navigation Controller a Navigation Bar should be immediately visible on the preview, like this:

But instead I cannot see anything:

I did not change any property of the Navigation Bar (that actually appeared on the view hierarchy by the way). What did I do wrong?
The default appearance of navigation bars is changed in iOS 15. From TN3106:
Now navigation bars have a transparent background by default, which is why you can't see it.
You should use the
UINavigationBarAppearanceAPI to configure navigation bars. To get a translucent background like before, you should assign aUINavigationBarAppearance, configured with "default background" tonavigationBar.scrollEdgeAppearance.If this is nil (the default), a transparent version of the
standardAppearancewill be used.To do this in the storyboard, you can select the navigation bar in the hierarchy, and check the "scroll edge" checkbox:
Note that the navigation bar for the view controllers connected to the
UINavigationControllerwould still incorrectly show a transparent navigation bar (not sure if this is intentional). It does exhibit the expected behaviour when you build and run the app.See TN3106 for more ways you can customise the navigation bar.