简体   繁体   English

将 UIView 添加到 UIWindow 的子视图时未检测到画外音

[英]Voiceover not detecting when adding UIView to UIWindow's subview

I have used common UIPickerView for my whole app.我为我的整个应用程序使用了通用的UIPickerView So, I have used UIWindow所以,我使用了UIWindow

CODE:代码:

@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 is not detecting this UIWindow subview. Voiceover未检测到此UIWindow子视图。

PickerViewController is shown but Voiceover circulating in ProfileViewController itself.显示了PickerViewController ,但VoiceoverProfileViewController本身中循环。

I dont know how to activate Voiceover in PickerViewController .我不知道如何在PickerViewController中激活Voiceover

Can any one help me on this?谁可以帮我这个事?

Tell VoiceOver a view that makes up a major portion of the screen has appeared with UIAccessibility.post(notification: .screenChanged, argument: newViewOrNil) .通过UIAccessibility.post(notification: .screenChanged, argument: newViewOrNil)告诉 VoiceOver 一个构成屏幕主要部分的视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM