在我的应用程序中,我想添加 .vcf 文件作为 MFMailComposeViewController 中的附件。
The MFMailComposeViewController 的文档 http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html表明其addAttachmentData:mimeType:文件名:实例方法是要走的路:
- (void)addAttachmentData:(NSData*)attachment mimeType:(NSString*)mimeType fileName:(NSString*)filename
The 依恋是实际加载或转换为 NSData 的 vcf 文件。
The mimeType对于 vcf 来说是@“文本/x-vcard”.
The fileName是您想要的任何名称,但您应该使用 .vcf 扩展名以确保电子邮件程序能够理解它。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)