I was having the same issue, what fixed it for me was this:
On the storyboard, for your Navigation Controller change the "Bar Tint" to its "Default" value, then on your code you can change it as you normally would.
// For the navigation bar
navigationController?.navigationBar.barTintColor = .red
// For the title
let attributes = [NSAttributedString.Key.foregroundColor: UIColor.white ]
navigationController?.navigationBar.titleTextAttributes = attributes
I have the code in viewDidLoad()
Oddly enough for me, it also fixed the issue I was having with the "Status Bar".
navigationBar.backgroundColor
. This works for me – EarlbarTintColor
for years, and it now doesn't work with the new SDK in Xcode 11.4 for iOS 13 devices.backgroundColor
also doesn't work. – Badenpowell