I'm trying to change my the color of the status bar on my application. As default, the color right now is white (I never set it up) and my color of the background is also white, so I can't really see the status bar. I tried changing it in my ViewController by adding this property:
private var style: UIStatusBarStyle = .default
this is my preferredStatusBarStyle:
override var preferredStatusBarStyle: UIStatusBarStyle {
return self.style
}
and on viewDidAppear I tried this:
override func viewDidAppear(_ animated: Bool) {
style = .default
setNeedsStatusBarAppearanceUpdate()
}
This is an answer I saw here on Stackoverflow, but it just won't work for me. I tried changing the navigationBar barStyle also, also didn't work.
I'm using a TabBarController embedded in NavigationController, tried to change both navBarColor / preferredStatusBarStyle, also didn't work.

