i have a feedback button in my ios 7 application with MFMailComposeViewController. After the user click this button the mailcomposer open but the statusbar changed to black.
In my case, I was using "view controller-based status bar appearance" and presenting a modal view controller with a custom segue transition and then presenting the MFMailComposeViewController from there. In this situation, by default, iOS only respects/uses the presenting or "root" view controller's preferredStatusBarStyle
method.
So once I overrode childViewControllerForStatusBarStyle
in my root view controller and preferredStatusBarStyle
in my modal view controller, everything worked as expected... something like this:
// in RootViewController.m ...
- (UIViewController *)childViewControllerForStatusBarStyle {
return self.modalViewController;
}
// in ModalViewController.m ...
- (UIStatusBarStyle)preferredStatusBarStyle {
if (self.mailController != nil)
return UIStatusBarStyleDefault;
return UIStatusBarStyleLightContent;
}