OGeek|极客世界-中国程序员成长平台

标题: ios - 有没有办法在 iOS 应用程序中更改 VoiceOver 中默认辅助功能操作的文本? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 18:26
标题: ios - 有没有办法在 iOS 应用程序中更改 VoiceOver 中默认辅助功能操作的文本?

我在我的应用中为 VoiceOver 用户添加了一些可访问性自定义操作,但默认情况下它显示“激活项目,默认操作”。

通过使用转子,VoiceOver 用户将转子项目更改为操作,然后他们执行注册的自定义操作(如删除或共享项目)。但是他们有默认操作,即“激活项目”。有没有办法改变这个文本?我希望它说“播放这个项目”。或者,如果我可以禁用默认操作,它也对我有用。

UIAccessibilityCustomAction *action1 = [[UIAccessibilityCustomAction alloc] initWithName"double tap to share" target:self selectorselector(voiceOverActionShare)];
UIAccessibilityCustomAction *action2 = [[UIAccessibilityCustomAction alloc] initWithName"double tap to view more info" target:self selectorselector(voiceOverActionMoreInfo)];
UIAccessibilityCustomAction *action3 = [[UIAccessibilityCustomAction alloc] initWithName"double tap to add to my list" target:self selectorselector(voiceOverActionAdd)];
UIAccessibilityCustomAction *action4 = [[UIAccessibilityCustomAction alloc] initWithName"double tap to play" target:self selectorselector(voiceOverActionPlay)];

这就是我添加可访问性自定义操作的方式。但是我得到了五个操作,因为它们具有默认操作,即“激活项目,默认操作”。我可以改变它说话的方式吗?我想让它像“播放这个项目”这样说。



Best Answer-推荐答案


我找不到任何方法来阻止读取默认操作 (iOS 10.2)。您可以考虑在 bugreport.apple.com 提交增强请求.

旁注: 您的问题可能说明了 VoiceOver 中的一个错误。设置 UIAccessibilityTraitNotEnabled,相当于禁用和调暗控件,防止调用 acccessibilityActivate(),但仍然允许您触发其他自定义操作。我已经提交了错误报告 (rdar://29941588)。

关于ios - 有没有办法在 iOS 应用程序中更改 VoiceOver 中默认辅助功能操作的文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41356451/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4