We have a nice functionality in IOS to know whether UIAccessibility Voice over is active. The function to use is UIAccessibilityIsVoiceOverRunning(). I would like to know whether we have a similar functionality for UIAccessibility switch control. I am not able to know whether the user is in switch control mode or not i.e whether scan is happening or not. How to identify whether the user is in switch control mode of UIAccessibility?
Asked
Active
Viewed 206 times
2 Answers
0
It's not as easy as you'd like. From my interactions with Apple, the switch control and possibly other aspects of the UIAccessibility API isn't as thoroughly implemented as VoiceOver.
What I have found is the following:
Note that this container view creates the array of accessible elements only when methods of the UIAccessibilityContainer protocol are called. As a result, if iPhone accessibility is not currently active, the array is not created.
At this link.
Which suggests that one way is to record when if calls are made to methods of the UIAccessibility Container, and if they are, then accessibility can be considered to be ON, be it VoiceOver or Switch Control.

PKCLsoft
- 1,359
- 2
- 26
- 35