Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Change the status bar to white when MFMailComposeViewController is launched from UIActivityViewController on iOS 11.
@implementation MFMailComposeViewController (XXAppearance)
// called when UIViewControllerBasedStatusBarAppearance = YES
- (UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleLightContent;
}
// called when UIViewControllerBasedStatusBarAppearance = YES
- (UIViewController *)childViewControllerForStatusBarStyle
{
return nil;
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment