1

我试图呼吁暂停 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一个 identifier

有什么建议么?我需要init一个带有 的标识符rawValue吗?

谢谢你的帮助!

4

1 回答 1

1

我试图呼吁暂停 VoiceOver 技术。

你不能,即使pauseAssistiveTechnologytype 属性乍一看似乎适合这个目的。

事实上,VoiceOver 不能被暂停,因为系统需要在需要时接管……这意味着在暂停期间你也可以强加,而暂停在这种情况下不再意味着什么。

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

于 2020-02-12T08:49:39.097 回答