如何在iOS上将文件发送到另一个应用程序 [英] How to send files to another app on ios
本文介绍了如何在iOS上将文件发送到另一个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Dropbox应用程序允许将文件发送到其他应用程序,例如teamviewer或iBook。他们怎么做到的?
Dropbox application permit to send files to other applications like teamviewer or iBook. How do they do that?
我认为将数据发送到另一个应用程序的唯一方法是URL方案。
I thought the only way to send data to another application was the url scheme.
推荐答案
我认为Dropbox使用文档交互 API来提供此功能。
I think Dropbox using Document Interaction API to provide this functionality.
文档:
您可以使用文档交互控制器来显示文件预览或提示用户为文件选择操作。
You can use a document interaction controller to display a file preview or to prompt the user to choose an action for a file.
- 要模态显示文件预览,请调用
presentPreviewAnimated:
方法。 - 提示用户一组选项(包括在另一个应用程序中打开文件的选项),调用
presentOptionsMenuFromRect:inView:animated:
或presentOptionsMenuFromBarButtonItem:animated:
方法。 - 要仅提示用户在另一个应用程序中打开文件,请调用
presentOpenInMenuFromRect:inView:animated
:或presentOpenInMenuFromBarButtonItem:animated:
方法。
- To modally display a file preview, call the
presentPreviewAnimated:
method. - To prompt the user with a set of options, including an option to open the file in another app, call the
presentOptionsMenuFromRect:inView:animated:
orpresentOptionsMenuFromBarButtonItem:animated:
method. - To prompt the user only to open the file in another app, call the
presentOpenInMenuFromRect:inView:animated
: orpresentOpenInMenuFromBarButtonItem:animated:
method.
这篇关于如何在iOS上将文件发送到另一个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文