Making share extension with custom layout

故事扮演 提交于 2019-12-03 15:22:40

问题


I want to develop ios share extention with custom callout. In apple documents

To provide a custom compose view instead of the standard one, deselect “Use standard social compose interface” in the Xcode target-adding pane. When this checkbox is deselected, the default SharingViewController class is based on NSViewController or UIViewController, depending on the platform you chose.

but I can't find the check box. Can anyone show me how to disable it and is there any good tutorials for share extention.

Thanks


回答1:


It looks like that option was removed (or never made it to a public release).

Anyway, from reading the description, it sounds like you just need to create a share extension, and change the ShareViewController's superclass from SLComposeServiceViewController to UIViewController, and get rid of the isContentValid, didSelectPost, and configurationItems stub methods in the class definition.

Then you can set up your view however you like in MainInterface.storyboard.




回答2:


This answer above deserved an update. We should not change super class of ShareViewController, instead configure it via configurationItems to add configuration options via table cells.

This tutorial show how to do it properly.



来源:https://stackoverflow.com/questions/25922118/making-share-extension-with-custom-layout

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