gpt4 book ai didi

ios - 在 ios 上, native 邮件上的取消和发送按钮不起作用。用户被阻止

转载 作者:行者123 更新时间:2023-11-29 11:39:37 25 4
gpt4 key购买 nike

下面是打开 native 邮件应用程序的功能,单击取消按钮时没有任何反应, native 邮件应用程序上的发送按钮正在发送邮件,但用户也被阻止。用户没有得到任何操作响应。

   @IBAction func openNativeEmail(_ sender: AnyObject){
if MFMailComposeViewController.canSendMail() {
debugPrint("can send mail")
let mailVC = MFMailComposeViewController()
mailVC.mailComposeDelegate = self
mailVC.setToRecipients(["pawanline@gmail.com"])
mailVC.setSubject("Testing mail App features")
mailVC.setCcRecipients(["pawan.kumar@iic.ac.in"])
mailVC.setMessageBody("Hi,just testing ", isHTML: false)
present(mailVC, animated: true, completion: nil)
} else {
print("Unable to send the mail")
}

func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {
controller.dismiss(animated: true, completion: nil)
}

最佳答案

您缺少右括号:

   @IBAction func openNativeEmail(_ sender: AnyObject){
if MFMailComposeViewController.canSendMail() {
debugPrint("can send mail")
let mailVC = MFMailComposeViewController()
mailVC.mailComposeDelegate = self
mailVC.setToRecipients(["pawanline@gmail.com"])
mailVC.setSubject("Testing mail App features")
mailVC.setCcRecipients(["pawan.kumar@iic.ac.in"])
mailVC.setMessageBody("Hi,just testing ", isHTML: false)
present(mailVC, animated: true, completion: nil)
} else {
print("Unable to send the mail")
}
} // <----- THIS WAS MISSING

func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {
controller.dismiss(animated: true, completion: nil)
}

关于ios - 在 ios 上, native 邮件上的取消和发送按钮不起作用。用户被阻止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47300368/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com