UINavigationBar appearance

the styling of the UINavigationBar has changed in iOS15. I cannot get look I want anymore. Once I define either of the appearances (e.g. scrollEdgeAppearance) I can no longer get white text in the status bar. On the other hand if I just set UINavigationBar style to black with translucent set to NO it ignores the barTintColor unless you start scrolling. You can set the background color of the navigation bar but then the area under the scrollbar is solid black.

I just need a non-translucent UINavigationBar with a dark background ewxtending under the status bar with white text. Is it possible in iOS15?

Answered by ForumsContributor in
Accepted Answer

When using the new appearance objects, the status bar styling is defined by the userInterfaceStyle of the navigation bar's trait collection. You can influence this value directly with the overrideUserInterfaceStyle property.

@Rincewind: it works but if we do not want to use the new appearance methods - just have the original behaviour back there's no way in iOS 15. barTint doesn't work for UINavigationBar black style unless you start scrolling.

UINavigationBar appearance
 
 
Q