iosiphoneswiftipad

Status bar stays black even when set to light


I have app compatible with iPad and iPhone in Swift, supporting iOS 7 and 8, using XCode 6.4. Now I made app structured as master-detail control and set in split controller status bar to be light (white). In Storyboard, all controllers display white status bar (master, detail, navigation controllers...) but nor in simulator nor in iPhone / iPad is white but black!

I tried in each controller and its navigator controller to set light status bar. Tried in Master view controller to set it. Tried to add in plist option that allows me setting up per view controller (note that I do not want to control status bar color per controller but to set global for the app). Also tried to set override function for status bar style and even reload function in viewDidLoad func. And nothing worked.

I am really stuck here; I thought just set in split control light status bar and everywhere else it inherits it (and that's how it indeed looks in stoyboard). So what am I missing? Can anyone help me out or give me some hints or directions in further investigation?


Solution

  • Ok found it. In plist set "View controller-based status bar appearance" to NO and in appDelegate.swift in func application before return true add following line: splitViewController.navigationController?.navigationBar.tintColor = UIColor.whiteColor()