I am updating an outdated iPad platform, which is a splitView with basic and detailed views controlled by UINavigationControllers. Detailed view displays a series of UIWebViews. When the user touches the email button, the application programmatically picks up the standard email composer sheet in the detailView. This works great on an iOS6 device. The sheet slides up vertically to close the navigation bar and stops below the status bar. On an iOS7 device, the sheet slides up and above the navigation bar and closes the status bar. Nothing I tried keeps the composer sheet from covering the status bar in iOS7.
Here's the code that is part of the email class. The delegate is the UIViewController, which indirectly calls this method through the email button.
-(void)displayComposerSheet { MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.navigationBar.barStyle = UIBarStyleBlackOpaque; if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) { picker.navigationBar.barStyle = UIBarStyleBlackTranslucent; } picker.modalPresentationStyle = UIModalPresentationCurrentContext; picker.modalPresentationCapturesStatusBarAppearance = YES; picker.mailComposeDelegate = self; NSString *emailAddress = ruleEmailAddress;
Thanks for any suggestions on how to save the composer sheet from covering the status bar on iOS7 devices.
source share