'How do I change the statusBarStyle using the statusBarManager in iOS 13.0+
I am trying to change the status bar style in my iOS 13.0 app but when I use the code;
UIApplication.shared.statusBarStyle = .lightContent
I get the warning in Xcode;
'statusBarStyle' was deprecated in iOS 13.0: Use the statusBarManager property of the window scene instead
The problem is that the property statusBarManager?.statusBarStyle is a get only property so how can I change the status bar style programmatically?
Solution 1:[1]
Set View controller-based status bar appearance key value in info.plist to NO and programmatically set UIApplication.shared.statusBarStyle to either .lightContent or .default.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Stephen501 |
