2011-06-19 162 views

回答

0

你不能; MFMessageComposeViewController用于文本消息。

如果你读了MFMailComposeViewController文档,不过,你会看到这种方法:

- (void)addAttachmentData:(NSData*)attachment mimeType:(NSString*)mimeType fileName:(NSString*)filename 

我敢打赌,你可以从那里处理它。

+0

但我如何从一个.doc文件获取我的NSData对象? – CodeGuy

+0

和什么是mime类型? – CodeGuy

+0

看起来像(来自Google)'.doc'是'application/msword','.docx'是'application/vnd.openxmlformats-officedocument.wordprocessingml.document'。我以为在Cocoa有一些MIME类型可用,但我会尽快回复你... – jtbandes