iOS13 - Problem with navigationBar title color after update

My app was working fine but after i updated my XCODE and mac book to the latest update, then everything went dark. I had my title bar configured white from the main storyboard and now it's not recognizing the configuration. Then I tried hardcoding it into my viewcontroller and ios simulator and iphone is not honoring the configurations in storyboard or viewcontroller.


here's the code in my viewcontroller


if (@available(iOS 13, *)){

NSDictionary<NSAttributedStringKey,id> *attrib = [NSDictionary dictionaryWithObjectsAndKeys:

UIColor.whiteColor, NSForegroundColorAttributeName, nil];

_myNavBar.titleTextAttributes = attrib;

}


self.navbar.title = [NSString stringWithFormat:@"%@ %ld KJV", _getBookTitle, _getBookChapter.longValue];

Would you not be better using UIColor.systembackground to avoid annoying dark mode users?

Anyway, this code works for me (Swift, but you should be able to change it easily)

self.navigationController?.navigationBar.backgroundColor = UIColor.white
self.navigationController?.navigationBar.tintColor = UIColor.white

That is assuming your VC is embedded in a navigation controller that is.
Ah! Sorry I misread your question. You wanted text color not background. Sorry!
What navigation bar instance are you modifying? Normally you get a reference to the nav bar from your UINavigationController, not from your own stored property or outlet or whatever _myNavBar and self.navbar are in your example.
iOS13 - Problem with navigationBar title color after update
 
 
Q