How to open image in my ios app from another app?

纵然是瞬间 提交于 2019-12-30 02:30:30

问题


As Instagram and some another apps have option to open image in there app from any other app. I also want to do similar kind of thing for my iOS image processing app. So user can open there image from any app in my iPhone/iPad app. But I don't know how it is possible.


回答1:


Yes you can open any file type in other supported application in your iOS device with "Open In" option.

Please follow this apple document for Document Interaction Programming Topics for iOS will be helpful to you.

1) You can also refer this tutorial In which explain with example of pdf file.

2) For customisation check this and other possible types found here. you can manage different types of document by adding UTI.




回答2:


Navigate to your project.

Select your app target and open "info" tab.

Now in "Document Types" add a document type with these settings:

Name: "whatever" or "image"

Types: public.image

Save this and compile the app. Now your app should show in open in... list from other apps.

Now follow apple Opening Supported File Types and continue your development

For a complete list of types follow this: Uniform Type Identifiers Reference



来源:https://stackoverflow.com/questions/13106461/how-to-open-image-in-my-ios-app-from-another-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!