Как изменить порядок отображения данных в MFMailComposeViewController

У меня есть функция электронной почты в моем приложении. Вместе с телом сообщения я прикрепляю данные изображения по почте. Пока мы делаем [self PresentModalViewController:emailController анимированный:YES]; , он представляет собой представление, в котором сначала будет тело сообщения, а затем данные/изображение вложения.

Как изменить порядок, в котором показывалась почта. Мне нужно, чтобы сначала отображалось изображение, а затем должно следовать тело сообщения. Если кто знает ответьте немедленно.

Заранее спасибо. :)


person Sagar S. Kadookkunnan    schedule 07.04.2011    source источник
comment
Это возможно: stackoverflow.com/a/10069288/308315   -  person iwasrobbed    schedule 30.05.2013


Ответы (2)


Справочник по 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.
person visakh7    schedule 07.04.2011

Это невозможно, потому что MFMailComposeViewController встроено, предоставлено Apple, и мы можем использовать его только как есть, без изменений.

Хотя вы можете создать свой собственный Mail Composer Controller...

person Jhaliya - Praveen Sharma    schedule 07.04.2011