我正在尝试暂停 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.
我看到notificationVoiceOver是 an 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/