Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add to the iOS VoiceOver rotor for a custom view?

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?

like image 444
gaige Avatar asked Mar 11 '13 20:03

gaige


People also ask

What is rotor in iOS VoiceOver?

The VoiceOver rotor is a key component for iOS accessibility that is often overlooked. It allows users to change VoiceOver settings, select specific content types to focus on, adjust volume, and more.

What is a modifier key on iPhone?

The modifier is a key or set of keys you press with one or more other keys to enter VoiceOver commands. You can set the modifier to be the Caps Lock key or the Control and Option keys pressed at the same time. Go to Settings > Accessibility > VoiceOver > Typing > Modifier Keys.


1 Answers

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.

like image 102
Boris Dušek Avatar answered Sep 28 '22 01:09

Boris Dušek