ios - How do you exclude a UIButton from VoiceOver? -
I have UIButton which is sometimes empty (no text or image). When it's empty, I want to leave the voiceover over it. I have tried the following things, but none of them works - the button is still highlighted because the user swipe through the view:
-
button And set all of its sub-views'. This prevents the voiceover from saying anything when the button is selected, but it still allows the button to be selected by the voiceover.
-
Disable the button (I've verified that the button is disabled, debug view hierarchy view). The button remains selectable by the voiceover.
Does anybody know how to completely eliminate / ignore the voiceover on a UIButton?
Try the following:
someButton.isAccessibilityElement = NO; It tells the button that it is not an accessible element, but the voice-over should be stopped on the button.
Comments
Post a Comment