jjzjj

UIDocumentInteractionController

全部标签

ios - "Open In"动态生成的文件在 iOS 8 中失败

我使用此代码将一些PDF数据保存到文件中,使用“打开方式”菜单将其发送到另一个应用程序,然后在完成后删除该文件:-(void)openIn:(NSData*)fileData{//savethePDFdatatoatemporaryfileNSString*fileName=[NSStringstringWithFormat:@"%@.pdf",self.name];NSString*filePath=[NSStringstringWithFormat:@"%@/Documents/%@",NSHomeDirectory(),fileName];BOOLresult=[fileData

iOS 6 像消息一样共享,而不像照片(UIActivityViewController 和 UIDocumentInteractionController)

在iOS6中,点击照片应用中的操作按钮会显示标准的UIActivityViewController:在“消息”中执行相同的操作会提供一组不同的选项。在我看来,这就像是在使用UIDocumentInteractionControllerapi来拉取所有声称可以处理图像的应用程序。我的问题有两个:如何进入消息操作菜单?举几个例子,Tumblr和Halftone已经做到了……我似乎找不到文档。如何显示信息风格的操作菜单?当我展示UIActivityViewController时,它没有这些选项...只有标准集facebook/twitter/copy/print/savetocameraro

ios - 如何在 UIDocumentInteractionController 发送的电子邮件中设置收件人和主题字段?

我正在发送一封带有PDF附件的电子邮件,同时使用UIDocumentInteractionController,如下所示:我先展示PDF文件-(void)showPDFFile{NSURL*url=[NSURLfileURLWithPath:_filePath];if(url){_documentInteractionController=[UIDocumentInteractionControllerinteractionControllerWithURL:url];[_documentInteractionControllersetDelegate:self];[_document

ios - UIDocumentInteractionController 在没有选项的特定应用程序中打开文件

我正在使用UIDocumentInteractionController在另一个应用程序DropBox中打开文件。我想做的是在另一个特定的应用程序中打开文件,但到目前为止我只设法显示支持的应用程序并允许用户选择。UIDocumentInteractionController*udi=[UIDocumentInteractionControllerinteractionControllerWithURL:[NSURLfileURLWithPath:jpgPath]];[udiretain];CGRectr=CGRectMake(0,0,300,300);[udipresentOpenIn

ios - 无法关闭从 iOS 8 中的 UIDocumentInteractionController 调用的电子邮件表

我有一个非常简单的测试应用程序,它只包含以下代码,附加到UIButton:-(IBAction)buttonUp:(id)sender{//BuildfilepathNSString*filePath=[[NSBundlemainBundle]pathForResource:@"testfile"ofType:@"txt"];NSURL*url=[NSURLfileURLWithPath:filePath];m_interactionController=[UIDocumentInteractionControllerinteractionControllerWithURL:url];

iphone - UIDocumentInteractionController 在退出时崩溃

我的主菜单上有一个常规的UIButton,它当前启动一个UIViewController;对应的.m文件内容如下:-(id)initWithNibName:(NSString*)nibNameOrNilbundle:(NSBundle*)nibBundleOrNil{self=[superinitWithNibName:nibNameOrNilbundle:nibBundleOrNil];documentPath=[[NSBundlemainBundle]pathForResource:@"file"ofType:@"pdf"];NSURL*targetURL=[NSURLfileUR

iphone - 如何(以编程方式)判断是否有/没有任何支持打开特定文档类型的注册应用程序?

Apple的UIDocumentInteractionControllerpresentOpenInMenuFromBarButtonItem:animated:方法文档指出“如果没有支持打开文档的注册应用程序,文档交互Controller不会显示菜单。”在我的应用程序中,我想显示一个按钮当且仅当设备上有一个应用程序可以打开它。(我只希望按钮弹出一个菜单来打开文件;我不需要QuickLook、复制或打印)。就目前情况而言,如果按钮存在,但没有注册可以打开相关文件的应用程序,则用户会得到按钮在点击时什么也不做的不满意体验。那么-我可以找出是否有/没有支持打开特定文档类型的注册应用程序?显

ios - 带有 iOS 11.1.2 的 iphone 上的 UIDocumentInteractionController

当我在装有iOS11.1.2的iphoneX上使用UIDocumentInteractionController时,它不显示,并以以下身份登录控制台:[ShareSheet]ERROR:timedoutwaitingtoestablishaconnectiontotheShareUIviewserviceextension.但相同的代码在其他iOS11.1.2设备上运行正常,只有iphoneX无法预览documentInteraction菜单。我的代码有问题吗?如果您找到解决方案,请告诉我。我的代码:vardoc:UIDocumentInteractionController?file

ios - UIActivityViewController 和 UIDocumentInteractionController

如何组合UIActivityViewController和UIDocumentInteractionController?Mail应用程序和Tumblr应用程序似乎将UIActivityViewController与UIDocumentInteractionController结合在一起,因为它们的Controller除了UIActivities之外还显示“打开方式”按钮。我怎样才能做到这一点? 最佳答案 在UIDocumentInteractionController中使用presentOptionsMenuFromRect:in

iphone - 如何在 iOS 应用程序中使用 "open in..."功能?

我不想将我的应用程序添加到“打开方式...”列表中,而是要获取列表本身。并将文件发送到另一个应用程序。我正在开发内部通信应用程序,因此当用户收到文件附件时,他/她可以使用每台设备上安装的任何应用程序打开文件... 最佳答案 UIDocumentInteractionController*controller=[UIDocumentInteractionControllerinteractionControllerWithURL:[NSURLfileURLWithPath:appFile]];self.controller.deleg