本文介绍了如何使用VoiceOver逐段阅读UITextView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为失明的人编写一个应用程序,并希望在其主页上添加一些说明。该指令是一个多段静态文本块。我把它放在UITextView中。

I am writing an app for people with blindness and would like to put some instruction on its home page. The instruction is a multi-paragraph static text piece. I put it in a UITextView.

我希望盲人用户能够使用VoiceOver逐段读取指令。但是,当用户将VoiceOver焦点移动到UITextView上时,VoiceOver始终将指令作为整体读取。我的设备是带有iOS 7的iPad 2和iPhone 5。

I would like blind users to be able to read the instruction paragraph by paragraph using VoiceOver. However, when users move VoiceOver focus onto the UITextView, VoiceOver always read the instruction as a whole piece. My devices are iPad 2 and iPhone 5s with iOS 7.

那么,有什么方法可以设置我的UITextView,以便VoiceOver用户可以阅读文本段落段?如果使用UITextView无法做到这一点,还有哪些其他选择?我真的必须使用UITableView吗?

So, is there any way I can set up my UITextView so that VoiceOver users can read the text piece paragraph by paragraph? If that is impossible with a UITextView, what are some other options? Do I really have to use a UITableView?

谢谢!

Joe

推荐答案

VoiceOver用户,而不是您,确定一次读取多少文本。你可以通过继承 UITextView 并实现。但是,这对VoiceOver用户来说是不直观的,所以我建议你避免使用它。一些VoiceOver用户可以非常快速地收听大量的文本,如果你人为地强迫阅读在段落之间停止,那么对他们来说会很令人沮丧。

VoiceOver users, not you, determine how much text is read at once. You could override this by subclassing UITextView and implementing the UIAccessibilityContainer informal protocol. However, this would be unintuitive for VoiceOver users so I recommend you avoid it. Some VoiceOver users can listen to lots of text read extremely quickly, and it would be frustrating for them if you artificially forced the reading to stop between paragraphs.

TTTAttributedLabel 是一个支持超链接的开源标签库,它会覆盖这些方法以使链接可访问。您可能希望如果你决定按照我的建议继续这个实现。

TTTAttributedLabel, an open-source label library that supports hyperlinking, overrides these methods to make links accessible. You may wish to review the relevant source code if you decide to proceed with this implementation against my advice.

这篇关于如何使用VoiceOver逐段阅读UITextView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 04:43