I have a UIButton that is sometimes empty (no text or image). When it's empty, I want VoiceOver to skip it. I tried the following things, but none of them do the job - the button is still highlighted when the user views the views:
Define a button and all its children. Availability Traits for UIAcessibilityTraitNotEnabled. This does not allow VoiceOver to say anything when the button is selected, but it still allows the button to select VoiceOver.
Disable button (I checked that the button is disabled in the debug view hierarchy view). The button remains available using VoiceOver.
Does anyone know how to make VoiceOver completely skip / ignore UIButton?
source
share