[英]How did Buffer create the Share Menu feature for their iOS 8 app?
Buffer app for iOS 8 got a feature that lets you send an image from the new iOS 8 Share Menu to their app. 适用于iOS 8的缓冲区应用程序具有一项功能,可让您从新的iOS 8共享菜单向其应用程序发送图像。 The flow is like this:
流程是这样的:
- Open iOS Photos app
打开iOS照片应用
- Select an image and tap the share icon
选择图像并点击共享图标
- Select Buffer from the menu (you may need to enable it first)
从菜单中选择缓冲区(您可能需要先启用它)
- Buffer app opens and the image is automatically attached in the composer window
Buffer应用程序将打开,并且图像会自动附加到编辑器窗口中
How did they manage the part to invoke their full app without using a small widget like most of the other apps do? 他们如何管理零件以调用完整的应用程序而不像其他大多数应用程序那样使用小部件?
iOS Developer at Buffer here. 此处为Buffer的iOS开发人员。 So we make use of iOS 8's new extensions using a share app extension as detailed in the types here... https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ We actually do invoke just an extension rather than the full app.
因此,我们使用共享应用程序扩展程序来使用iOS 8的新扩展程序,如以下类型中所述: https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/实际上,我们仅调用扩展程序而不是完整的应用程序。
We use the same composer code within the app itself and the extension by having our own Cocoapod set up which is then set up as a dependency of the app and the extension target. 我们通过设置自己的Cocoapod,在应用程序本身和扩展程序中使用相同的作曲者代码,然后将其设置为应用程序和扩展程序目标的依存关系。 That way we only have 1 codebase and it shares the same familiar look and feel.
这样,我们只有1个代码库,并且具有相同的熟悉外观。
To set up a share extension you can follow along with Apple's guide here... https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1 要设置共享扩展名,您可以按照此处的Apple指南进行操作... https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid / TP40014214-CH5-SW1
Happy to answer any other questions. 很高兴回答任何其他问题。
I had that problem last week, check this documentation from Apple. 上周我遇到了这个问题,请从Apple查阅此文档。
https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ShareSheet.html https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ShareSheet.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.