简体   繁体   English

如何将共享扩展程序的控制器注入我的应用程序?

[英]How to inject share extension' controller into my app?

I have a controller with a share UITabBarButtonItem : 我有一个共享UITabBarButtonItem的控制器: 在此处输入图片说明

Now when I tap on the share button, I need to display sth like this: 现在,当我点击共享按钮时,我需要显示如下内容:

在此处输入图片说明

but with different apps: I need Apps for PDF or TEXT . 但使用不同的应用程序:我需要适用于PDFTEXT的应用程序。 How to do this? 这个怎么做?

So far I created app group, add share extension to the project... and, what should i do now? 到目前为止,我已经创建了应用程序组,向项目添加了共享扩展名...,我现在该怎么办?

you need to use share extension and add a SLComposeSheetConfigurationItem to your share extension for category name. 您需要使用共享扩展名,并将SLComposeSheetConfigurationItem添加到共享扩展名中以获取类别名称。

On click of category name show a list view with all possible options to choose category name and once user select one send image data and selected category name to server. 单击类别名称后,将显示一个列表视图,其中包含所有可能的选项来选择类别名称,并且一旦用户选择一个,就会将图像数据和选定的类别名称发送到服务器。

you can refer this links for more details 您可以参考此链接以获取更多详细信息

https://www.ibm.com/developerworks/community/blogs/mobileblog/entry/ios-8-share-extension-photos-ibm-bluemix?lang=en https://www.ibm.com/developerworks/community/blogs/mobileblog/entry/ios-8-share-extension-photos-ibm-bluemix?lang=en

https://www.shinobicontrols.com/blog/posts/2014/07/21/ios8-day-by-day-day-2-sharing-extension https://www.shinobicontrols.com/blog/posts/2014/07/21/ios8-day-by-day-day-2-sharing-extension

实际上我犯了一个错误,我需要UIActivityController而不是share extension

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何与我的主应用程序和 iOS 应用程序的应用程序扩展正确共享 Amplify 框架? - How can I properly share the Amplify framework with my Main App and my App Extension for an iOS app? 我的应用程序内部WhatsApp的共享扩展 - My App Inside WhatsApp's Share Extension 创建用于打开我的应用的iOS共享扩展 - Create iOS share extension that opens my app 如何在共享扩展视图控制器中获取标题? - How to Get the title in share extension view controller? 如何使watchkit扩展应用程序和我的iPhone应用程序共享相同的icloud数据库 - how to make watchkit extension app and my iphone app share the same icloud databases App Extension iOS9:如何从共享视图向我的应用程序发送字符串/ URL? - App Extension iOS9: How can I send a string / URL from the share view to my the app? 如何导航共享扩展以在Swift中托管应用程序? - How to navigate Share Extension to host app in Swift? 如何在App及其扩展之间共享课程? - How to share a class between app and it extension? 如何在React Native应用程序和共享扩展之间共享Realm数据库 - How to share a Realm Database between a React Native app and a Share Extension 为什么NSUserDefaults不能在我的应用和共享扩展程序之间工作? - Why doesn't NSUserDefaults work between my app & share extension?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM