Reputation: 4409
How to resolve this issue warning issue
UIApplication.shared.statusBarStyle = .lightContent
Warning Messages
'statusBarStyle' was deprecated in iOS 13.0: Use the statusBarManager property of the window scene instead.
Upvotes: 0
Views: 4168
Reputation: 380
for me it worked this way
override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
Upvotes: 1
Reputation: 2198
Use the statusBarManager
(UIStatusBarManager):
Overwrite the preferredStatusBarStyle
in your view controller and do this:
override var preferredStatusBarStyle: UIStatusBarStyle {
.lightContent
}
You can have a BaseViewController: UIViewController {}
class that controls that and make that all your VCs inherit from it.
Upvotes: 2