VoiceOver 正在读取我的 UIAlertController 后面的视图控制器内容
View Controller contents behind my UIAlertController are being read by VoiceOver
我有一个 UIAlertController
与视图控制器一起呈现。在呈现 UIAlertController
之前,我将 accessibilityViewIsModal
设置为 true
但是在使用 VoiceOver 时它仍然专注于并读出视图控制器 "behind" 上的所有内容 UIAlertController
(我用 UIAlertController
展示的那个)
let alertController = UIAlertController(title: alertTitle, message: nil, preferredStyle: .alert)
alertController.accessibilityViewIsModal = true
present(alertController, animated: true, completion: nil)
关于如何防止 VoiceOver 阅读不在警告对话框中的内容有什么想法吗?
我在与同事交谈后解决了这个问题。
在 UIAlertController
的 view
上设置 accessibilityViewIsModal
解决了这个问题,因为视图控制器本身不是 VoiceOver 关注的视图。
alertController.view.accessibilityViewIsModal = true
虽然这应该是自动处理的,因此我正在向 Apple 提交雷达。将很快用错误 ID 更新此答案。
我有一个 UIAlertController
与视图控制器一起呈现。在呈现 UIAlertController
之前,我将 accessibilityViewIsModal
设置为 true
但是在使用 VoiceOver 时它仍然专注于并读出视图控制器 "behind" 上的所有内容 UIAlertController
(我用 UIAlertController
展示的那个)
let alertController = UIAlertController(title: alertTitle, message: nil, preferredStyle: .alert)
alertController.accessibilityViewIsModal = true
present(alertController, animated: true, completion: nil)
关于如何防止 VoiceOver 阅读不在警告对话框中的内容有什么想法吗?
我在与同事交谈后解决了这个问题。
在 UIAlertController
的 view
上设置 accessibilityViewIsModal
解决了这个问题,因为视图控制器本身不是 VoiceOver 关注的视图。
alertController.view.accessibilityViewIsModal = true
虽然这应该是自动处理的,因此我正在向 Apple 提交雷达。将很快用错误 ID 更新此答案。