ViewController "Under Top Bars" Option Causes NavBar Color Change

Hello,


So presently when working with one of my UIViewControllers that has a scrollview, I want the scrollview not to extend past the navigationbar.


However, in deselecting the IBDesignable "Under Top Bars" in the viewcontroller's attribute inspector in storyboard, it adds a dark tint to the navigation bar which I would like to remove.


I've also tried "deselecting" this option programmatically to see if there was a difference, by setting in viewDidLoad():

edgesForExtendedLayout = [ ]

But that still causes the dark tint to appear.


Here are some pictures of the changes in storyboard simulation: but the dark tint is similarly applied when actually running on device.


Does anybody know the recommended way to circumvent this?

Replies

You can add a white UILabel 'under the top bar'

One possible solution is to assign a background color to the window.

ScenceDelegate: window?.backgroundColor = .white