I configure my navigationBar like this in the AppDelegate:
func setupNavBar() {
let barAppearance = UINavigationBar.appearance()
barAppearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: appRed]
barAppearance.setBackgroundImage(UIImage(color: .white), for: UIBarMetrics.default)
barAppearance.shadowImage = UIImage()
}
This works fine, however when I set the title as follows:
navigationController.navigationItem.title = "Hello"
this never works and I do not see any title. This is regardless of where I place the above line (viewDidLoad, viewDidAppear etc.)