xcode 是否有 iPhone API 允许我直接在我的应用程序中使用 VoiceOver?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2830176/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:21:36  来源:igfitidea点击:

Is there an iPhone API that allows me to use VoiceOver directly in my app?

iphonexcodeaccessibilityaccessibility-api

提问by Thomas

I'd like to allow a user to press a button directly from my app and read what's on the screen using VoiceOver. Right now, my only option is bundling recordings of each page and just playing them when the user presses the button. VoiceOver would really simplify this process. Is it possible?

我想允许用户直接从我的应用程序中按下按钮并使用 VoiceOver 阅读屏幕上的内容。现在,我唯一的选择是捆绑每个页面的录音,并在用户按下按钮时播放它们。VoiceOver 会真正简化这个过程。是否可以?

Thanks!
Thomas

谢谢!
托马斯

采纳答案by Jared

No, for more info on someone who wanted to do something similar see this link

不,有关想要做类似事情的人的更多信息,请参阅此链接

回答by Mike

You could use this

你可以用这个

if (UIAccessibilityIsVoiceOverRunning()) {
   UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification,
                                   @"Result has been computed.");
}

For further API details...

有关更多 API 详细信息...

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html

回答by artaxerxes

I came up against something similar.. to avoid recording a massive pile of audio ... you can use non native Text To Speech like the Flite Engine (which is free). Unfortunately the native Voice Over remains private - and also hiHymans the touches you would hope to use for button presses!

我遇到了类似的事情……为了避免录制大量音频……您可以使用非本地文本转语音,如 Flite 引擎(免费)。不幸的是,本机 Voice Over 仍然是私密的 - 并且还会劫持您希望用于按下按钮的触摸!

https://bitbucket.org/sfoster/iphone-tts

https://bitbucket.org/sfoster/iphone-tts