Xcode 8.1, Swift 3 Solution with @IBDesignable
This solution is slightly different:
- UIViewController subclass for centralizing logic
- No code for viewDidLoad or viewDidDisappear
- Uses @IBDesignable so that you can set the status bar color in the Attributes Inspector on the storyboard
Step 1 - Info.plist Setup File

Step 2 - Subclass UIViewController
import UIKit @IBDesignable class DesignableViewController: UIViewController { @IBInspectable var LightStatusBar: Bool = false override var preferredStatusBarStyle: UIStatusBarStyle { get { if LightStatusBar { return UIStatusBarStyle.lightContent } else { return UIStatusBarStyle.default } } } }
Step 3 - Inherit from DesignableViewController
Change the code for ViewController (s) from:
class ViewController: UIViewController {
To:
class ViewController: DesignableViewController {
Step 4 - Set Your Preferences on the Storyboard
Select ViewControllers on the storyboard and go to the attribute inspector: 
Step 5 - Run the project and test
In my project, I set up a tab bar controller with two view controllers and switch between them. It seems good to me.

source share