暂停画外音时的异常 [英] Exception when pausing voice over

查看:28
本文介绍了暂停画外音时的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试暂停画外音并出现异常:

I try to pause voice over and get an exception:

UIAccessibilityPostNotification(UIAccessibilityPauseAssistiveTechnologyNotification,UIAccessibilityNotificationVoiceOverIdentifier)

UIAccessibilityPostNotification(UIAccessibilityPauseAssistiveTechnologyNotification, UIAccessibilityNotificationVoiceOverIdentifier)

'NSInvalidArgumentException',原因:'您必须传递暂停的辅助技术.参见 UIAccessibilityConstants.h有效值的列表.'

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

怎么了?谢谢!

推荐答案

您必须使用 UIAccessibility.AssistiveTechnologyIdentifier 像:

You must use an UIAccessibility.AssistiveTechnologyIdentifier like:

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

这篇关于暂停画外音时的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆