setStatusBarStyle was deprecated in iOS 9?

I am trying to figure out how to fix this issue in Swift on Xcode 7 (iOS9) and I am also having this error:


'setStatusBarStyle(_:animated:_)' was deprecated in iOS 9.0: Use -[UIViewController preferredStatusBarStyle]


My code:

UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: false)


I have no idea why "setStatusBarStyle" was deprecated in iOS 9. I looked at documentation and they didn't update it yet.

Any suggestion appreciated. Thanks.

Accepted Answer

I didn't see that. Thanks for sharing it!

setStatusBarStyle was deprecated in iOS 9?
 
 
Q