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

时间:2011-04-07 06:24:48

标签: iphone ipad mfmailcomposeviewcontroller

我的应用中有电子邮件功能。与邮件正文一起,我在邮件中附加了图像数据。虽然我们做[self presentModalViewController:emailController animated:YES]; ,它提供了一个视图,其中,首先是消息体,然后是附件数据/图像。

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

提前谢谢你。 :)

2 个答案:

答案 0 :(得分:1)

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

虽然您可以创建自己的自定义Mail Composer控制器......

答案 1 :(得分:1)

The MFMailComposeViewController reference清楚地说明图像是在身体后面和签名上方附加的

 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.