我的UIAlertController后面的视图控制器内容正在被VoiceOver读取
问题描述:
我有一个UIAlertController
,我用视图控制器呈现。呈现UIAlertController
之前,我设置accessibilityViewIsModal
到true
但使用VoiceOver时,它仍然集中在,并读出视图控制器“后面” UIAlertController
(即我提出了我UIAlertController
一)我的UIAlertController后面的视图控制器内容正在被VoiceOver读取
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
这应该会自动处理,因此我正在向苹果提交一份雷达。将很快更新此答案与错误ID。