1

Is there any way to create a custom gesture in iOS specifically for VoiceOver users?

Thank you

2 Answers2

1

I think this MIGHT be possible. The iOS Mail app (at least in iOS 6) seems to contain custom Voiceover actions (you can swipe up or down to enable a "delete" operation on a mail item in the list).

My guess is (and I haven't verified this, is that if you add a swipe recogonizer only when UIAccessibilityIsVoiceOverRunning() returns true.

I haven't tested this yet.

Michael Gray
  • 611
  • 1
  • 5
  • 13
  • This is the solution. The documentation even states as much in its description of `UIAccessibilityIsVoiceOverRunning`: "You can use this function to customize your application’s UI specifically for VoiceOver users. For example, you might want UI elements that usually disappear quickly to persist onscreen for VoiceOver users. Note that you can also listen for the `UIAccessibilityVoiceOverStatusChanged` notification to find out when VoiceOver starts and stops." – Matthew Frederick Sep 09 '12 at 07:51
  • 1
    FWIW, unless it was necessary I wouldn't add and remove the recognizer based on the status of `UIAccessibilityIsVoiceOverRunning`; instead I'd simply do nothing in the method called by the gesture recognizer when VoiceOver is turned off. The only reason I'd add and remove the gesture is if it would get in the way of non-VoiceOver users. – Matthew Frederick Sep 09 '12 at 07:54
0

I'm almost certain that this is not possible. That said, the accessibility APIs allow you to do things like speak content when a view changes, so maybe you could use this?

You mentioned a gesture specifically for Voiceover users - if Voiceover users are the majority of your audience, then you could just provide a standard gesture, which Voiceover users could invoke by double tapping and holding to pass the gesture through, and then performing the gesture itself.

For example, to "pull to refresh" a Voiceover user would double tap, hold, then pull down.

Saqib
  • 7,242
  • 7
  • 41
  • 55