ios - 有没有办法在 MFMailComposeViewController 中的 "Send"之前以编程方式更改电子邮件正文?

标签 ios email subclassing

目前,我正在显示一个 MFMVCC,其预设正文中包含一个链接。我想在用户选择“收件人:”收件人之后和“发送”之前“摆弄”消息正文。我想更改正文中的 URL 并将“收件人:”值而不是我在 URL 中的占位符。

我研究了 MFMCVC 的 header ,但无法在任何地方找到“sendMail”操作,因此我可以将 MFMCVC 子类化。嗯,是否可以为“发送”按钮创建我自己的目标,获取现有目标,在我的方法中更改它,然后调用原来存在的目标?如果是...我该如何实现?

最佳答案

来自documentation

Important: The mail composition interface itself is not customizable and must not be modified by your application. In addition, after presenting the interface, your application is not allowed to make further changes to the email content. The user may still edit the content using the interface, but programmatic changes are ignored. Thus, you must set the values of content fields before presenting the interface.

因此,如果您希望提交到应用商店,则不能这样做。您必须有自己的界面来选择收件人,并在呈现 Composer 之前构建您的消息正文。

关于ios - 有没有办法在 MFMailComposeViewController 中的 "Send"之前以编程方式更改电子邮件正文?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7965575/

相关文章:

ios - ionic native 存储在 iOS 上不起作用

ios - Flutter ios 构建失败 Pods-Runner-frameworks.sh

C++ 动态类型 - 覆盖方法

javascript - 电子邮件验证 Jquery 不起作用

email - 如何分辨Outlook 2003(或更早版本)的用户代理与IE open的区别?

objective-c - 子类化您自己的类之一还是使用相同的父类?

python - 在创建时将属性附加到类

ios - 为什么我的 Tabbar 的用户交互在从 popviewcontroller 到另一个 View 时启用?

ios - Kotlin Native (iOS),使用 CValuesRef 和 CCCrypt

java - 从 Java 使用 Gmail 发送邮件而无需打开安全性较低的应用程序