How we can set the Light Content style of Status Bar in iOS 9 for whole application?

前端 未结 2 1604
野性不改
野性不改 2020-12-10 04:39

I want to apply Light Content style to the whole application.

Following method is deprecated in iOS 9 without the replacement method.

-setStat

相关标签:
2条回答
  • 2020-12-10 05:10

    You can also used: UIApplication.shared.statusBarStyle = .lightContent. It also works in swift3.

    0 讨论(0)
  • 2020-12-10 05:24

    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.

    0 讨论(0)
提交回复
热议问题