Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Voice over mode - Scrolling to subviews that are off view in scrollview

I have a scroll view with a number of buttons as subviews. These subview buttons are also stored in an array. When I use the one tap slide gesture in the voice over accessibility mode to go through all UI elements in my view from top to bottom, voice over only reads the accessibility labels up to the beginning/last visible buttons within the scroll view, then starts to read out other UI components in the view.

The accessibilityScroll delegate Protocol function only gets called if the user performs an actual scroll within the scroll view so this will not be fit for my scenario where a user is only using the one tap slide gesture to navigate through all the UI components in the view.

Is there a way I can determine what subview array button is currently being read out in voice over mode so I can scroll to a particular offset/button position within the scrollview to have buttons currently offset be brought into the view so they can also be read out? Or is there a simpler way to achieve what I want? I would appreciate your advice. Thanks

like image 920
flex007 Avatar asked Sep 11 '14 18:09

flex007


1 Answers

You can determine the current accessibility focus using the UIAccessibilityFocus Protocol. If accessibility focus changes to an offscreen element, advance the scroll view so that it's visible, again. This can be necessary for handling accessibility in nested scroll views.

like image 99
Justin Avatar answered Oct 19 '22 05:10

Justin