preferredStatusBarStyle is not working

Viewed 23034

I used to use setStatusBarStyle in my project and it works fine, but it is deprecated so I use preferredStatusBarStyle, that didn't work. knowing that I've:

  1. Call the method setNeedsStatusBarAppearanceUpdate.
  2. Set "View controller-based status bar appearance" to NO in info.plist
  3. Override the function

    • (UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleLightContent; }

    this function is not called

Note: I'm using navigation controller.

1 Answers
Related