文档说 UIDocumentInteractionController 允许使用已安装的应用程序而不是本机的应用程序隐式打开文件(UTI 属性为 nil)。
UIDocumentInteractionController *controller = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
[controller retain];
controller.delegate = self;
//controller.UTI = uti;
CDVViewController* cont = (CDVViewController*)[ super viewController ];
CGRect rect = CGRectMake(0, 0, cont.view.bounds.size.width, cont.view.bounds.size.height);
[controller presentOpenInMenuFromRect:rect inView:cont.view animated:YES];
是否可以在 Safari 中打开例如 pdf 文件或在图库中打开图像?
PS我是Objective C的新手:)