如何创建标准的iOS共享按钮? [英] How do I create a standard iOS Share button?
问题描述
使用系统提供的共享按钮。用户熟悉此按钮的含义和行为,因此这是一个好主意在可能的情况下使用它。主要例外情况是,如果您的应用程序不包含工具栏或导航栏,[共享]按钮只能在工具栏或导航栏中使用。
Use the system-provided Share button. Users are familiar with the meaning and behavior of this button, so it’s a good idea to use it when possible. The main exception to this is if your app does not contain a toolbar or navigation bar[, as] the Share button can only be used in a toolbar or navigation bar.
确定,但如何使用系统提供的共享按钮? 搜索文档没有用。
OK, but how do I "use the system-provided Share button"? A search of the documentation turns up nothing useful.
我收集了我应该在我的响应中使用UIActivityViewController按钮
I've gathered that I should use UIActivityViewController in my response to the button being tapped, but how would I create the standard Share button in the first place?
推荐答案
标准的共享按钮是一个UIBarButtonItem(所以它只能在导航栏或工具栏上)。您需要创建系统项;具体来说,操作项。 操作栏按钮项是共享按钮。
The standard Share button is a UIBarButtonItem (so it can only go on a navigation bar or toolbar). You need to create a "system item"; specifically, an "action item". The "action" bar button item is the Share button.
这篇关于如何创建标准的iOS共享按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!