ios - 将 UIView 添加到 UIWindow 的子视图时未检测到画外音
问题描述
我在整个应用程序中都使用了 common UIPickerView
。所以,我用过UIWindow
代码:
@IBAction func show_Picker(_ sender: UIButton) { //ProfileViewController
let testController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "pick") as! PickerViewController
UIApplication.shared.keyWindow?.addSubview(testController.view)
}
Voiceover
没有检测到这个UIWindow
子视图。
PickerViewController
被显示但在其自身中Voiceover
循环。ProfileViewController
不知道怎么激活Voiceover
。PickerViewController
谁可以帮我这个事?
解决方案
告诉 VoiceOver 一个构成屏幕主要部分的视图已经出现UIAccessibility.post(notification: .screenChanged, argument: newViewOrNil)
。
推荐阅读
- java - 如何使用数组中的坐标在谷歌地图上绘制多边形
- javascript - Ajax - 我提交后无法显示帖子
- button - (如何)我可以更改 F# Fable Elmish 中禁用按钮的字体颜色吗?
- android - 使用Android项目的Gradle插件将代码注入合并清单
- linux - 反转很多值的 grep 没有一致的输出
- java - 动态生成的 JNLP,使用不同证书签名的 jar
- visual-studio-code - 需要能够使用快速打开在 VSCode 中搜索 python-packages
- python - 如何阻止第二个线程启动直到第一个线程停止或在 Tkinter 中执行线程时如何锁定按钮
- sql-server - (Sql Server) BEGIN TRANSACTION vs (Qt) QSqlDatabase.database().transaction()
- angular - 在现有元素上使用角度动画查询/交错?