I want to apply Light Content style to the whole application.
Following method is deprecated in iOS 9 without the replacement method.
-setStat
You can also used: UIApplication.shared.statusBarStyle = .lightContent. It also works in swift3.
You can save yourself a lot of work by using a UINavigationController and setting its navigation bar's barStyle
to .Black
. You only have to do this once; you can do it in the storyboard editor.
This will automatically turn your status bar's style to .LightContent
as long as this UINavigationController is in command.