【发布时间】:2014-02-22 19:02:15
【问题描述】:
我正在通过UIDocumentInteractionController 与其他应用程序共享 PDF。在添加此功能之前,我有一个使用 MFMailComposeViewController 的自定义“发送到电子邮件”按钮 - 但现在我的 UIDocumentInteractionController 中还有一个邮件按钮,我想使用它来避免重复按钮.
我的问题是,通过旧的邮件控制器,我曾经设置主题和内容文本,而如果我使用 UIDocumentInteractionController - 我只会收到一封带有 PDF 附件的空白电子邮件。有谁知道我可以解决这个问题并在使用UIDocumentInteractionController 时获取我的自定义主题和内容?
我在文档中找不到任何明显的内容,显然我无法干预 Mail 应用程序以使其与我的应用程序通信 - 但想知道是否有其他人遇到过这个问题,并提出了一个“后退-门的解决方案。
下面是我当前如何创建和初始化我的UIDocumentInteractionController 的代码:
-(void)openDocumentIn:(NSString*)filepath
{
//NSString * filePath = [[NSBundle mainBundle]
pathForResource:filePath ofType:@"pdf"];
documentController = [UIDocumentInteractionController
interactionControllerWithURL:[NSURL fileURLWithPath:filepath]];
documentController.delegate = self;
documentController.UTI = @"com.adobe.pdf";
[documentController presentOptionsMenuFromBarButtonItem:
[self.imageViewController exportQuote] animated:YES];
}
【问题讨论】:
-
你找到答案了吗?
-
@windup 很遗憾没有 - 仍然是一个悬而未决的问题!
标签: ios cocoa-touch ios7 uidocumentinteraction