Reputation: 61
This problem occurred after i did an update to xCode 11.5 (11E608c) and started testing on simulator with iOS 13.5, the statusBarStyle always stays Dark. When i test iOS 13.3 or 12.4 it works fine and the preferred preferredStatusBarStyle don't get called.
any one encountered this problem with the update ?
Upvotes: 2
Views: 112
Reputation: 82766
I also faced the same issues in iOS 13.4 > devices and I tried the answer as given apple developer forum - preferredStatusBarStyle not firing in iOS 13.4 but it did not helped for me, finally I tried with @Matt solution of preferredStatusBarStyle var not working in iOS12? its works fine for me and supported in all iOS devices.
In a navigation controller situation, the color of the status bar is not determined by the view controller’s preferredStatusBarStyle.
It is determined, amazingly, by the navigation bar’s barStyle. To get light status bar text, say (in your view controller):
self.navigationController?.navigationBar.barStyle = .black
Upvotes: 2