Status Bar showing black text, only on iPhone 6 iOS 8 simulator

前端 未结 14 991
伪装坚强ぢ
伪装坚强ぢ 2020-12-07 20:16

I\'m trying to convert my iOS 7 app to iOS 8 in Xcode 6 GM, and when i run it on the iPhone 5s or lower simulators with iOS 8 everything is fine, but on the iPhone 6 and 6 P

14条回答
  •  一生所求
    2020-12-07 21:00

    A similar answer (currently voted as 2nd) has already posted, buy in the interests of keeping this post up-to-date, here is the Swift version.

    1. Add a row to your info.plist file called View controller-based status bar appearance and set its boolean value to NO.

    2. In your AppDelegate.swift file, add the following method: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool { UIApplication.sharedApplication().statusBarStyle = .LightContent return true }

    3. I didn't need to do this step in order for it to work (i.e. do steps 1 and 2 and it might work). If not, try adding the following method to each of your ViewControllers:

      override func preferredStatusBarStyle() -> UIStatusBarStyle { return UIStatusBarStyle.LightContent }

    I hope this was helpful,

    Loic

提交回复
热议问题