To me this looks like a bug (rdar://15902745) in UINavigationController
. After a canceled dismissal UINavigationController
doesn't query again its presentedViewController
for the preferredStatusBarStyle
but uses the preferredStatusBarStyle
from itself. I worked around this by overwriting -childViewControllerForStatusBarStyle
:
- (UIViewController*)childViewControllerForStatusBarStyle {
if (self.presentedViewController) {
return self.presentedViewController.childViewControllerForStatusBarStyle;
}
return [super childViewControllerForStatusBarStyle];
}
Then, to animate the change during (and not after) the dismissal, I also overwrote -preferredStatusBarStyle
.
I pushed the workaround to the sample project.