ios - NSAttributedString 上的辅助功能(画外音)

标签 ios accessibility nsattributedstring voiceover

我在使用 NSAttributedString 构建的 UITextView 中有一段文本。我需要 VoiceOver 在触摸文本的某些部分时说一些额外的话。

是否可以向 NSAttributedString 添加辅助功能属性?

最佳答案

我认为对此的一种解决方案是 UITextView 的自定义子类。然后,您可以在 accessibilityCustomActions 的覆盖中返回一个 UIAccessibilityCustomAction 数组。这些对象不仅描述 TextView 采取的操作,而且还允许 VoiceOver 执行它们。

关于ios - NSAttributedString 上的辅助功能(画外音),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23490360/

相关文章:

html - 将文本添加到页面顶部,而不会将页面的其余部分向下推

ios - 生成PDF时不出现NSAttributedString

ios - 我如何在 webrtc ios 中压缩视频文件?

iphone - PhoneGap 2.7在状态栏中显示事件指示器

ios - 在 IOS 中切片和 reshape MLMultiArray

ios - NSMutableAttributedString 的属性 NSStrikethroughStyleAttributeName 在 iOS8 中不能正常工作

objective-c - iOS 相当于 MacOS NSAttributedString initWithRTF

IOS:xcode 4.2新项目

html - 网页可访问性 : Is the form tag required around inputs to be semantic/accessible?

java - 在 Objective-C 中从指针创建 NSWindow?