By default, it seems that UINavigationController
unfortunately doesn't provide a sensible default implementation of childViewControllerForStatusBarStyle
. By implementing this method, you can tell your navigationController to defer all calls to preferredStatusBarStyle
to its topmost childViewController.
You could either subclass UINavigationController
and implement the method there, or simply add a category:
@implementation UINavigationController (ChildStatusBarStyle)
- (UIViewController *)childViewControllerForStatusBarStyle
{
return self.topViewController;
}
@end