Tutorial – Set Status Bar Style
You can simply set the Status Bar Color in XCode using one method. By Default the status bar up the top is black, however you can change it to white with this method.
To do this in your XCode project to set the status bar in a view controller simply add the following method to your view controller class:
override var preferredStatusBarStyle : UIStatusBarStyle { return UIStatusBarStyle.lightContent }
And in our viewDidLoad() method we set the background color to red so we can see the Light status bar which is white:
override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. self.view.backgroundColor = UIColor.red }
This will result in the following: