I've got a label that's going to change to say something silly like "the sky is now blue" and I'd like to have VoiceOver read that new text aloud without a semi-blind user needing to press on the 开发者_StackOverflowlabel.
Is that possible however, to direct VoiceOver to read a specific item when & where I want?
Thanks.
See this answer: iPhone - make VoiceOver announce label text change
In short, you can tell iOS to speak text aloud when in voiceover mode by sending notifications, like:
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, @"the sky is now blue");
I'm still trying to figure out how to "focus" on a particular UIAccessibilityElement (i.e. make it as if they had tapped it), but I think in your case you could use UIAccessibilityAnnouncementNotification
to speak arbitrary text.
精彩评论