I want to change the status bar style on a per-ViewController level on iOS 13. So far I didn't have any luck.
I define UIUserInterfaceStyle
as Light
in info.plist (as I do not want to support dark mode) and set UIViewControllerBasedStatusBarAppearance
to true
. preferredStatusBarStyle
is called on my ViewController but completely ignored. The UIUserInterfaceStyle
seems to always override the VC preferences.
How do I get per-ViewController status bar style working on iOS 13? Or is it not supported any more?
IOS 13 status bar style
iosios13swiftuistatusbar
Best Answer
iOS 13.2, Swift 5.1
For me nothing worked from solutions mentioned before. After 5 hours I ended up on modalPresentationCapturesStatusBarAppearance flag .
After this
preferredStatusBarStyle
was called in presented VC.