MFMessageComposeViewController ios7涵盖状态栏

Pau*_*say 6 statusbar ios7 mfmailcomposeviewcontroller

我正在升级一个旧的iPad框架,它是一个splitView,包含由UINavigationControllers控制的主视图和详细视图.detailView显示一系列UIWebViews.当用户触摸电子邮件按钮时,应用程序将以编程方式显示detailView中的标准电子邮件编辑器表.这在iOS6设备上运行良好.工作表垂直向上滑动以覆盖navigationBar并停在状态栏下方.在iOS7设备上,工作表向上滑动并通过navigationBar并覆盖状态栏.我没有尝试过让作曲家表覆盖iOS7中的状态栏.

这是代码,它是电子邮件类的一部分.委托是UIViewController,通过电子邮件按钮间接调用此方法.

-(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;

// Set up recipients
NSArray *toRecipients = @[emailAddress];
[picker setToRecipients:toRecipients];
[picker setSubject:ruleNumber];
[picker setMessageBody:ruleText isHTML:YES];

[(UIViewController *)delegate presentViewController:picker animated:YES completion:nil];
}
Run Code Online (Sandbox Code Playgroud)

感谢您提供有关如何使作曲家工作表覆盖iOS7设备状态栏的任何建议.