Hello !
I'm facing a problem since I updated XCode to 11.4 version.
Since the update, when I change the navigationBar barTintColor programmatically, the new color is not displayed ! The code was working on XCode 11.3 and still works for iPhones on iOS 12, so, I don't think this is a code problem.
Is somebody else having the same problem ?
Yes, having he same problem. This fixed it for me:
// Customize the navigation controller
if (@available(iOS 13, *)) {
self.navigationBar.standardAppearance = [[UINavigationBarAppearance alloc] init];
[self.navigationBar.standardAppearance configureWithDefaultBackground];
self.navigationBar.standardAppearance.backgroundColor = [Branding shared].primaryColor;
self.navigationBar.standardAppearance.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor]};
}
else {
self.navigationBar.barTintColor = [Branding shared].primaryColor;
self.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor]};
}
self.navigationBar.tintColor = [UIColor whiteColor];
self.navigationBar.translucent = NO;