问题描述
我希望我的QR码扫描应用程序在找到QR码时通知用户。对于有视力的用户,这可以使用底部的标签进行更新以通知用户。但是,盲人用户必须再次点击该标签才能通过Voice Over读取。我更喜欢它只是自动阅读。
I'd like to have my QR code scanning app inform the user when it finds a QR code. For sighted users, this works using a label at the bottom that updates to notify the user. However, a blind user would have to tap on that label again to have it read by Voice Over. I would much prefer it to just read automatically.
我能找到的最接近这个问题的是
,这是不可能的。虽然这对我的应用来说不是好兆头,那是一年前的事。 Apple是否以任何方式更新了它的UIAccessibility协议以允许此操作?
The closest I can find to this question isUIAccessibility - Read all the labels and buttons on the screen from top to down, which wasn't possible. While this doesn't bode well for my app, that was a year ago. Has Apple updated it's UIAccessibility protocol in any way to allow this?
作为最后的手段,我想如果启用VoiceOver,我可以播放自己的mp3录音。
As a last resort I suppose I could play my own mp3 recording if VoiceOver is on.
非常感谢任何帮助!
推荐答案
你可以让VoiceOver说任何字符串您想要的时间通过调用:
You can make VoiceOver speak any string any time you want by calling:
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification,NSLocalizedString(已检测到QR代码,评论:))
没有直接的方法告诉VoiceOver说出VoiceOver光标未打开的元素的更新。这(即手动说出相同的内容)是一种可行的解决方法。
There is no direct way to tell VoiceOver to speak updates of an element that VoiceOver cursor is not on. This (i.e. speaking the same content "manually") is a feasible workaround.
这篇关于有没有办法让VoiceOver在命令中读取标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!