我正在迁移到使用UIActivityViewController在iOS6中进行共享,但我无法弄清楚如何创建电子邮件附件对象,以便通过电子邮件分享。在iOS5中相应的代码如下:
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
[picker addAttachmentData:data mimeType:@"application/XXX" fileName:fileName];
[data writeToURL:filePath atomically:YES]
不应该是[data writeToURL:fileURL atomically:YES]
吗? - Gabriele Petronella