Search code examples
iosios7accessibilityuiaccessibilityswitchcontrol

Let Switch Control users trigger an action with a switch press


I have a switch control device "Ablenet (BLUE 2)" and I would like to control my application using the switch device. My application is a paged (horizondal pages) news reader application and I would like the switch device to control the news pages on my application to go forward and backward. I am able to use it with the default accessibility menus from the iOS.

The problem is it takes long time to navigate. Where in my application code can I handle raw switch input events to speed things up for the user?


Solution

  • Your application is not expected to, and indeed cannot, respond to switch input events directly. That is the role of Switch Control. Switch Control interprets these key presses as commands to direct a rectangular cursor, allowing users to navigate and interact with your app. Controls exposed via the UIAccessibility Protocol can be navigated in rapid sequence. Controls that are not exposed via this protocol may only be navigated using the sweeping cursor, a somewhat cumbersome tool that allows switch users to issue touch gestures. If you are unsatisfied with the user experience of your app under switch access, read up on how to make your app more accessible for all users. Many of the lessons for VoiceOver support generalize to other accessibility clients, including Switch Control.