I need to load a uiwindow from my storyboard and place this above all other windows. From what I've seen online the process for this has changed with iOS 13.
I'm aware of other answers that show how to set a new root VC at start up. However I need to change rootVCs back and forth between multiple view controllers within my storyboard based on user action.
At the moment I'm running the following 'pre-ios13' code but I'm getting warnings that this approach is no longer supported.
blackoutWindow.frame = UIScreen.main.bounds
blackoutWindow.backgroundColor = .black
blackoutWindow.windowLevel = UIWindow.Level.statusBar + 1
blackoutWindow.rootViewController = self as? UIViewController
blackoutWindow.makeKeyAndVisible()
Any help appreciated.