图片如下所示。
在我的应用程序中,添加了一个电子邮件提示,但状态栏现在是黑色的,我该如何将其更改为白色样式?
if MFMailComposeViewController.canSendMail() {
let composeMail = MFMailComposeViewController()
composeMail.mailComposeDelegate = self
// configs
composeMail.setToRecipients(["[email protected]"])
composeMail.setSubject("【饥荒口袋】反馈")
composeMail.setMessageBody("问题页面:\n\n\n\n建议:\n", isHTML: false)
composeMail.navigationBar.tintColor = UIColor.white.withAlphaComponent(0.85) // Mail VC's Button Color
// TODO: - Change status bar color
// show it
self.present(composeMail, animated: true, completion: nil)
}
尝试statusBarStyle
在present
像这样的邮件控制器中设置完成处理程序
self.present(composeMail, animated: true, completion:{ () in
UIApplication.shared.statusBarStyle = UIStatusBarStyle.lightContent
})
希望它会起作用。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句