Thanks, that is helpful!
I think it is important to explain the VC hierarchy a bit (it involves a UIScrollView (well, UICollectionView), which seems to have some acquired 'behind-the-scenes' connections with UINavigationBar)
UIWindow
|-- UINavigationController
|-- CustomContainerViewController (1)
|-- CustomContainerViewController (2) + DrawerViewController // from top side
|-- ContentViewController + DrawerViewController // from right side
CustomContainerViewController (1) contains two viewcontrollers: one filling the view of the container itself, the 'content' which is itself a CustomContainerViewController (the one called CustomContainerViewController (2). The 2nd viewcontroller in this CustomContainerViewController (1) is one that can be pulled down using a 'handle', drawn by the CustomContainerViewController (1), (making it seem as if it is pulled from behind the navigationbar).
CustomContainerViewController (2) is the 'content' of CustomContainerViewController (1). This container has the actual content in it's first viewController, and another viewController that can be pulled in from the right side of the screen, using another 'handle'.
That last one (the one that can be pulled in from the right side of the screen), has a UICollectionView filling the view of that viewController (not sure if this is important).
Here is the code that is called in -application:didFinishLaunchingWithOptions: and in response to a button tapped by the user to change the navigationBar's color:
UIColor *color = ...;
UIColor *textColor = ...;
self.rootNavigationController.navigationBar.barTintColor = color;
self.rootNavigationController.navigationBar.tintColor = textColor;
self.rootNavigationController.navigationBar.translucent = NO;
When building this against iOS16, the app has a transparent UINavigationBar, not what it should be: an opaque color. When those three lines hit, the navigationbar stays transparent.
With a small change (see below), the navigationbar now has the correct color (after this code gets called in application:didFinishLaunchingWithOptions:), but afterwards this code seems to have no effect.
UIColor *color = ...;
UIColor *textColor = ...;
if (@available(iOS 13.0, *))
{
[UINavigationBar appearance].standardAppearance.backgroundColor = color;
[UINavigationBar appearance].compactAppearance = [UINavigationBar appearance].standardAppearance;
[UINavigationBar appearance].scrollEdgeAppearance = [UINavigationBar appearance].standardAppearance;
}
self.rootNavigationController.navigationBar.barTintColor = color;
self.rootNavigationController.navigationBar.tintColor = textColor;
self.rootNavigationController.navigationBar.translucent = NO;
Might this be a bug in the iOS16 sdk?