An old client asked me to make some minor updates to his app. Compiling for iOS 15 and above, the bottom toolbar is now black (after momentarily flashing the original intended color). I had the same problem with the navigation bar, and fixed that with the below code, but the bottom toolbar is still problematic. (This app was written a long time ago so is in Objective C, but I would be grateful for answers in either Objective C or Swift).
UINavigationBarAppearance *appearance = [UINavigationBarAppearance new];
[appearance configureWithOpaqueBackground];
appearance.backgroundColor = [CommonColors colorWithHexString:@"174594"];
appearance.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};
self.navigationController.navigationBar.standardAppearance = appearance;
self.navigationController.navigationBar.scrollEdgeAppearance = self.navigationController.navigationBar.standardAppearance;
I thought to do something similar using UIToolbarAppearance, but couldn't make it work. This is what I tried:
UIToolbarAppearance *toolbarAppearance = [UIToolbarAppearance new];
[toolbarAppearance configureWithOpaqueBackground];
toolbarAppearance.backgroundColor = [CommonColors colorWithHexString:@"174594"];
toolbarAppearance.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};
self.navigationController.toolbar.standardAppearance = toolbarAppearance;
Thanks for any help.