I have a tap bar that with 3 items. The first item is a UISplitView
showing a UIViewController
with a UITableView
. The other two items are simple UIViewControllers
embedded in a UINavigationController
.
The two UIViewControllers
embedded in a UINavigationController
have a navigation bar with their title provided by the UINavigationController
and "default" color.
I added a UINavigationBar
to the UINavigationController
in the first item but it has different color, it is white (Messages in the gif):
So I found out the default color of the UINavigationBar
embedded in a UINavigationController
and set it in code
navigationBar.barTintColor = UIColor(colorLiteralRed: (247/255), green: (247/255), blue: (247/255), alpha: 1)
The navigation bar changes color but the status bar remains white:
I tried the accepted answer from How to change Status Bar text color in iOS 7 but it did not help.
So how do I style the UINavigationBar
in my view controller so it exactly matches the default one in navigation controller?