iOS 7 状态栏中的 MFMailComposeViewController 是黑色的 [英] MFMailComposeViewController in iOS 7 statusbar are black

查看:20
本文介绍了iOS 7 状态栏中的 MFMailComposeViewController 是黑色的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 ios 7 应用程序中有一个带有 MFMailComposeViewController 的反馈按钮.用户单击此按钮后,mailcomposer 将打开,但状态栏变为黑色.有人知道我能做什么吗?

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. Have anybody a idea what can i do?

我只在 ios7 上有这个问题.我为 ios7 定制了我的应用程序.

i have this problem only with ios7. i customizing my app for ios7.

    MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init];
            mailController.mailComposeDelegate = self;

            [mailController setSubject:@"Feedback"];
            // Fill out the email body tex
            NSString *emailBody = [NSString stringWithFormat:@"testest"],
                                   [UIDevice currentDevice].model,
                                   [UIDevice currentDevice].systemVersion];
            [mailController setMessageBody:emailBody isHTML:NO];
            [mailController setToRecipients:[NSArray arrayWithObjects:@"support@test.com",nil]];

            dispatch_async(dispatch_get_main_queue(), ^{
                [self presentModalViewController:mailController animated:YES];
}

推荐答案

为你的 MFMailComposeViewController 在 presentViewController 的完成块中设置 UIApplication statusBarStyle.即

Set the UIApplication statusBarStyle in the completion block of presentViewController for your MFMailComposeViewController. i.e.

    MFMailComposeViewController *mailVC = [[MFMailComposeViewController alloc] init];
    [self.navigationController presentViewController:mailVC animated:YES completion:^{
        [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
    }];

您可能还需要在 Info.plist 文件中添加和/或设置基于控制器的状态栏外观"为 NO.

You may also need to add and/or set "View controller-based status bar appearance" to NO in your Info.plist file.

这篇关于iOS 7 状态栏中的 MFMailComposeViewController 是黑色的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆