Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I influence what appears in the VoiceOver rotor?

I have a text based app where I want my users to make use of the 'Lines' rotor option when VoiceOver is enabled. However the option doesn't appear. The text in my app is laid out using cells in a tableview (the cells contain UILabels and other views).

I'm afraid my implementation affects how the rotor is "seeing" my app, but I think it's unfortunate if it limits me from supporting the rotor fully.

Is there any way I can make use of the 'Lines' option in the rotor?

like image 927
Mikkel Selsøe Avatar asked Dec 31 '25 02:12

Mikkel Selsøe


1 Answers

I think you are looking for the UIAccessibilityReadingContent protocol.

The UIAccessibilityReadingContent protocol can be implemented on an object that represents content that is intended to be read by users, such as a book or an article.

There are four methods to implement:

  • accessibilityLineNumberForPoint:
  • accessibilityContentForLineNumber:
  • accessibilityFrameForLineNumber:
  • accessibilityPageContent

You are going to have to figure out how to cut the text into lines, the frame of each line and what line a certain point belongs to (hit testing) but since you are using table views you should be able to hook into the frames of the cells to figure out those things.

like image 82
David Rönnqvist Avatar answered Jan 02 '26 19:01

David Rönnqvist