How do I create a standard iOS Share button?(如何创建标准的 iOS 分享按钮?)
问题描述
iOS 人机界面指南说:
<块引用>使用系统提供的分享按钮.用户熟悉此按钮的含义和行为,因此最好尽可能使用它.主要的例外情况是,如果您的应用不包含工具栏或导航栏[,因为] 共享按钮只能在工具栏或导航栏中使用.
好的,但是我如何使用系统提供的分享按钮"?搜索文档没有发现任何用处.p>
我收集到 我应该在我的响应中使用 UIActivityViewController 来响应被点击的按钮,但我首先要如何创建标准的分享"按钮?
标准的分享按钮是一个 UIBarButtonItem(所以它只能在导航栏或工具栏上).您需要 创建一个系统项";具体来说,一个行动项目".操作"栏按钮项是共享按钮.
The iOS Human Interface Guidelines say:
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.
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?
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 分享按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何创建标准的 iOS 分享按钮?


- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01