Try This Code:
In your AppDelegate:
var navigationBarAppearace = UINavigationBar.appearance()
navigationBarAppearace.titleTextAttributes = [NSForegroundColorAttributeName:UIColor.whiteColor()] // If you want to change title colour
UIApplication.sharedApplication().statusBarStyle = UIStatusBarStyle.Default
//Update your plist with below code
View controller-based status bar appearance = NO
In your ViewController:
override func viewDidLoad() {
super.viewDidLoad()
// UIApplication.sharedApplication().statusBarStyle = .LightContent
navigationController?.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default)
navigationController?.navigationBar.shadowImage = UIImage()
navigationController?.navigationBar.tintColor = UIColor.whiteColor()
navigationController?.navigationBar.translucent = true
}
func sideMenuWillOpen() {
print("sideMenuWillOpen")
UIApplication.sharedApplication().statusBarStyle = .LightContent
}
func sideMenuWillClose() {
print("sideMenuWillClose")
UIApplication.sharedApplication().statusBarStyle = .Default
}
Output from the above code.You can use some sort of UIAnimation to sync the effect..
Let me know.If the code works for you...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…