swift - 暂停辅助技术 - VoiceOver

标签 swift voiceover uiaccessibility accessibility

我正在尝试暂停 VoiceOver 技术:

UIAccessibility.post(notification: .pauseAssistiveTechnology, argument: UIAccessibility.AssistiveTechnologyIdentifier.notificationVoiceOver)

错误是:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'You must pass the identifier of the assistive technology to pause.  See UIAccessibilityConstants.h for the list of valid values.

我看到notificationVoiceOveran identifier .

有什么建议吗?我是否需要使用 rawValue初始化标识符?

感谢您的帮助!

最佳答案

I'm trying to call for a pause to VoiceOver technology.

你不能,即使 pauseAssistiveTechnology 类型属性乍一看似乎适合此目的。😨

事实上,VoiceOver 无法暂停,因为系统需要在需要时接管...这意味着在您强加的暂停期间,暂停在这种情况下不再意味着任何意义。

这种暂停的一个很好的候选者是开关控制功能,如 this discussion 中所述。 Apple 文档。

关于swift - 暂停辅助技术 - VoiceOver,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60182068/

相关文章:

ios7 - NSLayoutConstraints 在 ios7 上崩溃但在 ios8 上没有

ios - UIMenuController 未显示在 textView 中

ios - Touch ID 的 VoiceOver 辅助功能标签

ios - 动画 UIView 时自动调整 CAShapeLayer 大小

ios - 文字栏已停用配音

ios - 在打开 VoiceOver 的排序 View 列表中找不到 <UINavigationButton...

ios - 使用 VoiceOver 在 iOS 14 上禁用 UIImageView 的图像识别

ios - IOS 上的辅助功能问题。画外音未检测到 aria-expanded

iOS 9.1 在辅助功能检查器打开时崩溃应用程序

ios - 将 tableViewCell 中的数据传递给另一个 VC 失败