How do I explicitly set the statusbar label color between light and dark?
I tried setting the rootController of NavigationDrawerController by a subclass of UINavigationController which had override preferredStatusBarStyle but it is not getting called
class CustomNavigationController: UINavigationController {
override var preferredStatusBarStyle: UIStatusBarStyle {
if #available(iOS 13.0, *) {
switch Appearance.current {
case .automatic:
return .default
case .dark:
return .darkContent
case .light:
return .lightContent
}
}
return .default
}
}
let sidemenuVC = SideMenuViewController.instantiate(fromAppStoryboard: .sideMenu)
drawerController = NavigationDrawerController(
rootViewController: CustomNavigationController(), // <- Note the subclass of UINavigationController
leftViewController: sidemenuVC
)
AppDelegate.shared.window?.rootViewController = drawerController
My app supports iOS 11 onwards
I am using Material 3.1.8(latest)
I have my app in NavigationDrawer and the initialization code looks like this
How do I explicitly set the statusbar label color between light and dark?
I tried setting the rootController of NavigationDrawerController by a subclass of UINavigationController which had override
preferredStatusBarStyle
but it is not getting calledMy app supports iOS 11 onwards I am using Material 3.1.8(latest)