0

I have this script working fine on xcode 11 but in xcode 13, it says window was deprecated in ios 15.0, use UIWindowScene.windows on a relevent window scene instead. Can someone help please?

DispatchQueue.main.async{

                self.dismiss(animated: true, completion: nil)

                let story = UIStoryboard(name: "Main", bundle:nil)

                    let vc = story.instantiateViewController(withIdentifier: "ViewController") as! ViewController

                    UIApplication.shared.windows.first?.rootViewController = vc

                    UIApplication.shared.windows.first?.makeKeyAndVisible()

            }

Thanks for your help

john
  • 1

0 Answers0