繁体   English   中英

有没有一种方法可以更改iOS应用程序中VoiceOver中默认辅助功能的文本?

[英]Is there a way to change text for default accessibility action in VoiceOver in iOS app?

我在我的应用程序中为VoiceOver用户添加了一些辅助功能自定义操作,但默认情况下显示为“激活项目,默认操作”。

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

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

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

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM