I am upgrading my app to use the new UIScene
patterns as defined in iOS 13, however a critical part of the app has stopped working.
I have been using a UI
Thank you @glassomoss. My problem is with UIAlertController.
I solved my problem in this way:
var windowsPopUp: UIWindow?
public extension UIAlertController {
func showPopUp() {
windowsPopUp = UIWindow(frame: UIScreen.main.bounds)
let vc = UIViewController()
vc.view.backgroundColor = .clear
windowsPopUp!.rootViewController = vc
windowsPopUp!.windowLevel = UIWindow.Level.alert + 1
windowsPopUp!.makeKeyAndVisible()
vc.present(self, animated: true)
}
}
windowsPopUp = nil
without the last line the PopUp is dismissed but the windows remains active not allowing the iteration with the application (with the application window)