To create a new UIWindow over the main window

后端 未结 8 2417

In my app I want to create a new UIWindow over the main UIWindow, And I wrote as following, but it don\'t works. first, i create a UIWindow as the

8条回答
  •  情书的邮戳
    2020-12-07 23:25

    if you just need to change shared window ViewController in swift 5

    UIApplication.shared.keyWindow?.rootViewController = UINavigationController(rootViewController: yourViewController)
    

提交回复
热议问题