0

When VoiceOver is enabled, I'd like to find out if the user is performing the left/right flick action while a UIButton is selected.

There are few methods help you with when a specific element has received or lost focus:

  • accessibilityElementDidLoseFocus
  • accessibilityElementDidBecomeFocused

But nothing within the UIAccessibilityAction to help find if the user attempted a flick left or right.

Is there a way to find out what the user is attempting to do?

Justin
  • 20,509
  • 6
  • 47
  • 58
Willam Hill
  • 1,572
  • 1
  • 17
  • 28

1 Answers1

0

No. You should not attempt to override the left and right VoiceOver swipe gestures. if you need to adjust a value with swiping, consider implementing a custom control with the trait UIAccessibilityTraitAdjustable. If you need to support direct gesture interaction, adopt UIAccessibilityTraitAllowsDirectInteraction.

Edit: To answer your question, you might be able to watch focus change, issue a screen change notification, return new children, and focus the first. Please see my comment below about why this may be undesirable.

Justin
  • 20,509
  • 6
  • 47
  • 58
  • I don't need to change values through swiping - I want to find out when the user is flicking left on the first button in a series of control elements so I can provide additional options. – Willam Hill Mar 29 '14 at 22:52
  • I've edited my my answer, but have to ask why you want to do this. The interaction is not familiar to VoiceOver users and could affect the behavior of Switch Control. Instead, consider offering additional options when the user activates the control. – Justin Mar 30 '14 at 00:21