暂停辅助技术-VoiceOver

问题描述 投票:0回答: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.

[我看到notificationVoiceOveran identifier

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

感谢您的帮助!

swift voiceover uiaccessibility assistive-technology
1个回答
0
投票

我正在尝试暂停VoiceOver技术。

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

的确,VoiceOver不能暂停,因为系统需要在需要时接管...这意味着在暂停期间您也要施加,并且暂停在此情况下不再有效。

这种暂停的一个很好的候选者是如Apple文档this discussion中所述的Switch Control功能。

© www.soinside.com 2019 - 2024. All rights reserved.