Color text of status bar in XCode 6-b3 (Swift)

后端 未结 5 2069
闹比i
闹比i 2021-02-01 06:32

I\'ve try to modify status bar color text but no one answer from this thread doesn\'t work. Any especially for XCode 6?

I\'ve tried insert:

override func         


        
5条回答
  •  难免孤独
    2021-02-01 07:29

    Keenle is right on, from iOS7 onward, you have to opt out of viewController-based status bar styles before you can set it app-wide.

    doc:https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/index.html#//apple_ref/occ/instm/UIApplication/setStatusBarStyle:animated:

    "To opt out of the view controller-based status bar appearance behavior, you must add the UIViewControllerBasedStatusBarAppearance key with a value of NO to your app’s Info.plist file, but doing so is not recommended."

提交回复
热议问题