iphone - 在 UIActionSheets 上设置辅助功能标签的首选方法是什么

标签 iphone objective-c cocoa-touch

考虑将 KIF 添加到我们的应用程序以进行集成测试。我希望能够从 UIActionSheet 中选择一个按钮,但似乎没有一种有效的方法来为操作表中的每个按钮设置辅助功能标签。

我正在考虑使用 accessibleElementCount,以这种方式遍历按钮。这是执行此操作的首选方法还是有更标准的方法来设置 UIActionSheets 的可访问性?

最佳答案

来自UIKit User Interface Catalog :

Action sheets are accessible by default.

Accessibility for action sheets primarily concerns button titles. If VoiceOver is activated, it speaks the word “alert” when an action sheet is shown, then speaks its title if set (although iOS human interface guidelines recommend against titling action sheets). As the user taps a button in the action sheet, VoiceOver speaks its title and the word “button.”

从您的问题来看,您不清楚是否要将可访问性标签更改为按钮标题 + 按钮以外的其他内容,但看起来这不可能以直接的方式进行。

关于iphone - 在 UIActionSheets 上设置辅助功能标签的首选方法是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21008043/

相关文章:

ios - 如何取消正在进行的NSArray排序?

objective-c - 名称中包含 "iPhone"或 "iPad"的驼峰标识符的约定

ios - 如何允许在 UIButtons 上滑动来滚动?

ios - 如何以编程方式关闭 UITextView 中的自动更正弹出窗口?

ios - 导航 Controller 推送无法正常工作 ios 11

iphone - Xcode 4.2 Lion 不在旧设备上安装/运行项目。 iPhone 3G 4.2.1

iphone - 如何延迟Default.png?

iphone - iPhone 上的访问崩溃日志数据

IOS 8 iPad 仅制作 Launch Screen 人像

ios - 是否有一些 iOS 库在旧设备上模拟 3D 触摸查看和弹出?