【问题标题】:Voiceover not detecting when adding UIView to UIWindow's subview将 UIView 添加到 UIWindow 的子视图时未检测到画外音
【发布时间】:2020-08-16 14:20:28
【问题描述】:

我在整个应用程序中都使用了常见的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 已显示,但 VoiceoverProfileViewController 本身中循环。

我不知道如何在PickerViewController 中激活Voiceover

谁能帮我解决这个问题?

【问题讨论】:

    标签: ios swift voiceover uiaccessibility


    【解决方案1】:

    告诉 VoiceOver 一个占屏幕主要部分的视图已显示为 UIAccessibility.post(notification: .screenChanged, argument: newViewOrNil)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-21
      • 1970-01-01
      相关资源
      最近更新 更多