If you are wondering why your status bar style remains unchange when you push or present modally your view controller, here’s a checklist that might help you debug the issue:
Ensures that you had overridden
preferredStatusBarStyle method in the view controller to be pushed/presented.
Starting from iOS 7, modifying the status bar style requires you to override
preferredStatusBarStyle and return the style that you wanted. Here’s an example implementation that returns the light content status bar style:
When you present a view controller by calling the
presentViewController:animated:completion:method, status bar appearance control is transferred from the presenting to the presented view controller only if the presented controller’s
UIModalPresentationFullScreen. By setting
YES, you specify the presented view controller controls status bar appearance, even though presented non-fullscreen.
If you are doing custom transition, you might have set your view controller’s
UIModalPresentationCustom. As described above, the control of status bar appearance is not transferred in this case. You will have to set the
modalPresentationCapturesStatusBarAppearance value to
YES to receive control of status bar appearance. Here’s an example implementation: