如何更改 MFMailComposeViewController 中显示数据的顺序

发布于 2024-10-31 02:03:36 字数 214 浏览 6 评论 0原文

我的应用程序中有电子邮件功能。除了消息正文之外,我还在邮件中附加了图像数据。当我们这样做时 [selfpresentModalViewController:emailControlleranimated:YES]; ,它呈现一个视图,其中首先是消息正文,然后是附件数据/图像。

如何更改邮件显示的顺序。我需要首先显示图像,然后显示消息正文。如果有人知道请立即回复。

先感谢您。 :)

I have email functionality in my App. Along with the message body I attach an image data in the mail. While we do [self presentModalViewController:emailController animated:YES]; , it present a view in which, first the message body will be there and then the attachement data/image.

How can I change the order in which the mail showed. I need the image should be shown first and then the message body should follow. If anyone knows please reply immediately.

Thank you in advance. :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无需解释 2024-11-07 02:03:36

MFMailComposeViewController 参考明确指出图片附在正文之后、签名上方

 addAttachmentData:mimeType:fileName:

Adds the specified data as an attachment to the message.
- (void)addAttachmentData:(NSData*)attachment mimeType:(NSString*)mimeType fileName:(NSString*)filename
Parameters

attachment

    The data to attach. Typically, this is the contents of a file that you want to include. This parameter must not be nil. 
mimeType

    The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be nil.
filename

    The preferred filename to associate with the data. This is the default name applied to the file when it is transferred to its destination. Any path separator (/) characters in the filename are converted to underscore (_) characters prior to transmission. This parameter must not be nil.

Discussion

This method attaches the specified data after the message body but before the user’s signature. You may attach multiple files (using different file names) but must do so prior to displaying the mail composition interface. Do not call this method after presenting the interface to the user.

The MFMailComposeViewController reference clearly states that the image is attached after the body and above the signature

 addAttachmentData:mimeType:fileName:

Adds the specified data as an attachment to the message.
- (void)addAttachmentData:(NSData*)attachment mimeType:(NSString*)mimeType fileName:(NSString*)filename
Parameters

attachment

    The data to attach. Typically, this is the contents of a file that you want to include. This parameter must not be nil. 
mimeType

    The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be nil.
filename

    The preferred filename to associate with the data. This is the default name applied to the file when it is transferred to its destination. Any path separator (/) characters in the filename are converted to underscore (_) characters prior to transmission. This parameter must not be nil.

Discussion

This method attaches the specified data after the message body but before the user’s signature. You may attach multiple files (using different file names) but must do so prior to displaying the mail composition interface. Do not call this method after presenting the interface to the user.
允世 2024-11-07 02:03:36

这是不可能的,因为 MFMailComposeViewController 是 Apple 提供的内置的,我们只能按原样使用它,不能修改

虽然您可以创建自己的自定义 Mail Composer Controller...

It's not possible beacuse MFMailComposeViewController is inbuilt that is provided by Apple, and we can only use it as it is, Not modified

Although you can create your own custom Mail Composer Controller...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文