本文介绍了我可以影响VoiceOver转子中出现的内容吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于文本的应用程序,我希望我的用户在启用VoiceOver时使用行转子选项。但是,该选项没有出现。我的应用程序中的文本使用表格视图中的单元格进行布局(这些单元格包含UILabels和其他视图)。

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?

推荐答案

我认为您正在寻找 UIAccessibilityReadingContent 协议。

I think you are looking for the UIAccessibilityReadingContent protocol.

有四种实现方法:


  • accessibilityLineNumberForPoint:

  • accessibilityContentForLineNumber:

  • accessibilityFrameForLineNumber:

  • accessibilityPageContent

  • accessibilityLineNumberForPoint:
  • accessibilityContentForLineNumber:
  • accessibilityFrameForLineNumber:
  • accessibilityPageContent

您要转到必须弄清楚如何削减文字诠释o线,每条线的框架以及某个点属于哪条线(命中测试),但是由于您使用的是表格视图,因此您应该能够插入单元格的框架中以找出那些东西。

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.

这篇关于我可以影响VoiceOver转子中出现的内容吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 08:13