How to change status bar style during launch on iOS 7

前端 未结 6 1368
慢半拍i
慢半拍i 2020-12-23 13:13

When I launch my app, it shows the launch image and a black status bar. How can I change it so the status bar is light during launch? I have set the status bar appearance to

6条回答
  •  执念已碎
    2020-12-23 14:18

    Just define this method in any view or file you want:

    - (UIStatusBarStyle)preferredStatusBarStyle
    {
        return UIStatusBarStyleLightContent;
    }
    
    // swift 
    override func preferredStatusBarStyle() -> UIStatusBarStyle {
        return .LightContent
    }
    

提交回复
热议问题