Instantly share code, notes, and snippets.

Embed
What would you like to do?
let newWindow = UIWindow(frame: UIScreen.main.bounds)
newWindow.rootViewController = rootViewController
UIWindow.transition(with: appDelegate.window, duration: 0.3, options: .transitionCrossDissolve, animations: {
let oldWindow = appDelegate.window
appDelegate.window = newWindow
newWindow.makeKeyAndVisible()
oldWindow?.rootViewController?.dismiss(animated: false, completion: nil)
}, completion: nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment