【问题标题】:How do I get my app to show up in the “Open In…” List on iPhone?如何让我的应用程序显示在 iPhone 上的“打开方式...”列表中?
【发布时间】:2013-04-26 04:37:03
【问题描述】:

我在 info.plist 中找到了使用文档类型的链接

How do I get my app to show up in the "Open In..." popover list in the iPad?

但是如果我想在文档类型中添加任何类型的文件,我应该在 info.plist 中添加“jpg,png,pdf,mov,xml,php,doc,ppt.....”。

有没有一种简单的方法可以让 myapp 在另一个应用中打开任何类型的文件?

【问题讨论】:

标签: iphone ios cocoa-touch


【解决方案1】:

通常我们会在 actionsheet 中写入 Open,点击后我们会调用文档交互控制器来查找可以打开文档的适用应用程序

UIDocumentInteractionController *docInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:@"file_full_path.pdf"]];

[docInteractionController presentOptionsMenuFromRect:self.view.frame
                                                   inView:self.view
                                                 animated:YES];

fileURLWithPath:- 包含完整路径的文件名

【讨论】:

  • 感谢您的回答,但您不明白我的问题。我希望 myapp 显示在另一个应用程序的“打开方式”列表中,而不是让其他应用程序显示在 myapp 的“打开方式”列表中。
猜你喜欢
  • 2012-08-12
  • 2023-03-12
  • 2011-09-17
  • 2019-06-19
  • 1970-01-01
  • 2010-12-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多