I'm trying to change the style of statusBar, and I tried to use the following code:
override func viewWillAppear(animated: Bool) {
//1
UIApplication.sharedApplication().statusBarStyle = UIStatusBarStyle.LightContent
//2
self.setStatusBarStyle(UIStatusBarStyle.LightContent)
//3
if self.respondsToSelector(#selector(setNeedsStatusBarAppearanceUpdate)){
self.setNeedsStatusBarAppearanceUpdate()
}
}
But this doesn't work, can anyone help me out.