当从“显示和文本大小”设置中打开“增加对比度”时,我遇到了 MFMailComposeViewController 的问题。当“增加对比度”打开并且我在全屏模式下打开 MFMailComposeViewController 时,MFMailComposeViewController 的“后退”和“发送”按钮不可见,如果我将其作为弹出窗口打开,则它是可见的。我已附上屏幕截图和代码以供参考。
if MFMailComposeViewController.canSendMail() {
let composer = MFMailComposeViewController()
composer.mailComposeDelegate = self
composer.setSubject("activityType")
composer.setToRecipients(["[email protected]"])
composer.setSubject("Sample Subject")
composer.setMessageBody("<html><body>Sameple Body<br /><br /></body></html>", isHTML: true)
composer.modalPresentationStyle = .fullScreen
composer.modalTransitionStyle = .crossDissolve
self.present(composer, animated: true, completion: nil)
}
我认为这是 MessageUI 框架中的一个错误。有一个解决方法:在呈现
tintAdjustmentMode
时强制使用 MFMailComposeViewController
。你可以尝试一下:
let composer = MFMailComposeViewController()
composer.view.tintAdjustmentMode = .normal
...