Unchanged barTintColor UINavigationBar on iOS 13.4

After upgrading Xcode to Version 11.4 (11E146) on iOS 13.4 barTintColor only changes through the storyboard. In the code, changes are ignored.

self.navigationController.navigationBar.barTintColor = UIColor.redColor;

Also a problem with the color of the title.

https://stackoverflow.com/questions/60847296/unchanged-bartintcolor-uinavigationbar-on-ios-13-4

Accepted Reply

This works if barTintColor is set to the default value. Oh, Apple...

Replies

This works if barTintColor is set to the default value. Oh, Apple...

You're not the first to experience the problem.


Apparently, you have to use appearance.


Have a look at this

https://forums.developer.apple.com/thread/130597

or this tutorial for wift version

h ttps://coderwall.com/p/dyqrfa/customize-navigation-bar-appearance-with-swift

I already wrote the solution above: it is necessary to change barTintColor to default value in the storyboard.

Thanks for feedback, did not see your post.


You could file a bug (at least against documentation).

Yep, this was all that was needed for me. Storyboard still looks incorrect (my bar is intended to be completely transparent), but at runtime it appears as intended.


Now I just have to go to all of my other nav bars and ensure this is set. Shame on me for upgrading Xcode before shipping.