2

I've created a custom view that acts like a UISlider - there is a "track", and a handle to "grab" to change the value. For particular reasons, I can't just make it a subclass of UISlider. I'm trying to make this slider as accessible as possible with VoiceOver. I have accessibilityIncrease and accessibilityDecrease on my custom view that handle single finger drag up and single finger drag down. This changes the value of the slider by 10% at a time.

However, I'd like to allow more fine grained control, just like a non-VoiceOver slider. By default , UISlider has double tap and hold, and you can drag up/down to "pan" the slider. I'd like to add exactly that to my custom view, but I can't find the correct incantation to handle the double tap and hold gesture.

Is there something I can do to mimic the double tap and hold gesture from UISlider on my custom view?

Thanks very much!!!

Hoopes
  • 3,943
  • 4
  • 44
  • 60

1 Answers1

1

If you want to implement this kind of new gesture for VoiceOver users, just forget it.

The recommended gesture for this kind of UI control is definitely the implementation of adjustable value as you already did apparently.

I don't think it's a good idea to try and implement new VoiceOver gestures in an application because its users have their habits and they may be totally lost with your customed control if they cannot handle it unless you add an hint to explain but that's definitely not what I recommend anyway.

Otherwise, you could take a look at the pass through concept introduced in the What's New in Accessibility WWDC 2017 video that deals with the same idea but for a panning gesture...

XLE_22
  • 5,124
  • 3
  • 21
  • 72
  • Do you have any more information about the pass-through feature? It seems like that's exactly what I want - pass through the pan gesture to the view itself. That would scrub the slider just like a regular UISlider, right? I can't find examples of that feature in swift anywhere. Much appreciated! – Hoopes Feb 28 '19 at 20:28
  • It's more a 'concept' than a 'feature', I corrected the term in my post. It's easier to be implemented within the WWDC example because the object can be divided in many parts. You could do that with your custom slider and affecting the activation point for each little part but it's quite a mess to get your purpose. I haven't seen this concept implemented anywhere but the use of 'activationPoint' is well explained here : http://a11y-guidelines.orange.com/mobile_EN/dev-ios.html#modify-the-focus-area-of-voiceover – XLE_22 Mar 01 '19 at 16:10
  • Thanks very much - I punted, and forced myself to use a `UISlider`. Unfortunate that the alternative was so difficult. Appreciate your time and help! – Hoopes Mar 01 '19 at 19:13