5

Recently, I've been working to get my application functioning well with VoiceOver. Generally it's been simple and straightforward, but there are some behaviors from system apps that I'd like to emulate, and I'm having a hard time locating the API to set things up.

In particular, I'm interested in adding a couple of options to the VoiceOver "rotor" and responding to them when the user increases and decreases the value. However, despite the fact that apps like Apple's Maps app add items to the rotor and are able to respond, I can't figure out how to do so for my app.

Has anyone succeeded in doing this? And if so, how?

gaige
  • 17,263
  • 6
  • 57
  • 68

2 Answers2

4

With iOS 8, you can use the -accessibilityCustomActions method to return an array of UIAccessibilityCustomAction objects, representing the actions you'd like to present "rotor-style".

Sea Coast of Tibet
  • 5,055
  • 3
  • 26
  • 37
  • This does enlarge the list of current rotor items for which you can adjust how they work (from 2 to 3, adding "Actions" rotor item). But it still does not allow to add custom rotor items. – Boris Dušek Jan 14 '15 at 21:29
  • 1
    It does allow to add custom rotor items; I did just that in my app using this method. – Sea Coast of Tibet Jan 15 '15 at 05:15
3

UPDATE: iOS 10 finally adds ability to add custom rotor items to VoiceOver (not the same thing as the "Actions" rotor item) - just add array of UIAccessibilityCustomRotor objects to accessibilityCustomRotors of the appropriate container view.

OLD ANSWER:

There is currently no API to add your own rotor items. You can only implement how some of the existing rotor items work:

  1. "Adjust value" - here you should return UIAccessibilityTraitAdjustable trait for accessibilityTraits and then implement the accessibilityIncrement/accessibilityDecrement methods
  2. "Headings" - you mark some views as UIAccessibilityTraitHeader, then those should be the view the user moves through when the user rotates to "Headings" and flicks up/down
  3. OLD UPDATE: "Actions" - see UIAccessibilityCustomAction

I guess you should file a radar if you need to add custom items to rotor.

Boris Dušek
  • 1,272
  • 11
  • 12
  • Unfortunately, that's what I seem to be seeing as well. Looks like only Apple has managed to add things so far (Maps in particular has zoom levels, but Google Maps uses the "Adjust Value" method). – gaige Mar 14 '13 at 11:32
  • Do you happen to know how make the 'Lines' option appear in the rotor? It is not shown although it's selected in the System Settings. I have an app which is largely text based, but uses a UITableView with cells to layout the text. – Mikkel Selsøe Apr 01 '14 at 17:28
  • I've asked the above as a seperate question: http://stackoverflow.com/questions/22793032/can-i-influence-what-appears-in-the-voiceover-rotor – Mikkel Selsøe Apr 01 '14 at 17:42