iOS 7 status bar back to iOS 6 default style in iPhone app?

前端 未结 25 896
终归单人心
终归单人心 2020-11-22 05:48

In iOS 7 the UIStatusBar has been designed in a way that it merges with the view like this:

\"GUI

25条回答
  •  别那么骄傲
    2020-11-22 06:21

    This might be too late to share, but I have something to contribute which might help someone, I was trying to sub-class the UINavigationBar and wanted to make it look like ios 6 with black status bar and status bar text in white.

    Here is what I found working for that

            self.navigationController?.navigationBar.clipsToBounds = true
            self.navigationController?.navigationBar.translucent = false
            self.navigationController?.navigationBar.barStyle = .Black
            self.navigationController?.navigationBar.barTintColor = UIColor.whiteColor()
    

    It made my status bar background black, status bar text white and navigation bar's color white.

    iOS 9.3, XCode 7.3.1

提交回复
热议问题