问题描述
下面的代码用于打开带有正文消息和更多收据 (10 - 200) 的 MFMessageComposeViewController
。在 14 岁以下的 iOS 中它运行良好,但现在绿色的发送按钮什么也不做。
我错过了什么?
messageController = MFMessageComposeViewController()
messageController.body = message
messageController.recipients = recipients
messageController.messageComposeDelegate = self
controller.present(messageController,animated: true)
更新: 在使用 iPhone 6 iOS 12.4 进行测试后,相同的代码可以正常处理 100 个收据,但使用新的 iOS 最多 10 个收据,但我在文档中找不到这种行为。
还要注意,如果我上传了超过 10 个联系人的照片,并且文本字段附近的存储图标消失,并且当我输入超过一行文本时,文本字段不会显示所有文本
所以在玩完控制器和他的子视图后,我放弃了这个任务并开始使用短信链接
let recipientsstring = phoneNumbers.joined(separator: ",")
let sms: String = "sms:/open?addresses=\(recipientsstring)&body=\(message)"
let strURL: String = sms.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!
UIApplication.shared.open(URL.init(string: strURL)!,options: [:],completionHandler: nil)
像魅力一样工作,唯一的问题是我没有任何回调。
对于那些想要重现该问题的人,请打开包含 100 个联系人和正文消息的 MFMessageComposeViewController
。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)