I use a white-on-red UINavigationBar colour scheme across my app by modifying [UINavigationBar appearance] during app launch.
[[UINavigationBar appearance] setBarTintColor:customRed];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlack];
if( @available( iOS 13.0, * ) )
{
[UINavigationBar appearance].titleTextAttributes = [UINavigationBar appearance].largeTitleTextAttributes = @{ NSForegroundColorAttributeName : [UIColor whiteColor] };
[UINavigationBar appearance].backgroundColor = customRed;
}Everything looks and works the same as from iOS 6 through 12 like this except when a navigation bar is using .scrollEdgeAppearance under iOS 13. In this case, the status bar is transparent: https://i.imgur.com/nXMSb4p.jpg. Once I scroll up the content of the nav controller slightly to flip the navigation bar to .standardAppearance, then the red colour properly extends under the status bar: https://i.imgur.com/TK2cOyu.jpg
Here's a gif of the behaviour: https://gfycat.com/heartfeltdiscretedugong
How do I make the red colour extend under the status bar when .scrollEdgeAppearance is the active mode?
The workaround offered here (https://forums.developer.apple.com/message/366616#366616) doesn't do the right thing, and if it did, it would have to be implemented throughout the app rather than setting it up globally once.