Can you please suggest me, what is the proper way to setup the style of statusbar for MFMailComposeViewController
in iOS >= 9.0?
I know, that [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
is deprecated and I can't use it.
I know that the possible solution is adding category like this:
#import "MFMailComposeViewController+StatusBarStyle.h"
@implementation MFMailComposeViewController (StatusBarStyle)
#pragma mark - Status bar management
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
- (UIViewController *)childViewControllerForStatusBarStyle {
return nil;
}
@end
But in this case I should enable View controller-based status bar appearance
option and implement - (UIStatusBarStyle)preferredStatusBarStyle
in the all ViewContollers that exist in my app (and I have a lot of them).
So, is there another solution?