UIApplication.sharedApplication().setStatusBarStyle() deprecated in iOS 9

前端 未结 9 655
野的像风
野的像风 2021-02-01 13:34

I have been using

UIApplication.sharedApplication().setStatusBarStyle()

In my appDelegate and it has worked fine, but since iOS 9, this method

9条回答
  •  [愿得一人]
    2021-02-01 14:24

    In swift 3.

    In your view controller:

    override var preferredStatusBarStyle: UIStatusBarStyle {
        return UIStatusBarStyle.lightContent
    }
    

    If you wish when the app run your launch screen also has the status bar in lightContent then:

提交回复
热议问题