Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dobreandl/033e606765cfd865bcc6bbc1d4e04581 to your computer and use it in GitHub Desktop.
Save dobreandl/033e606765cfd865bcc6bbc1d4e04581 to your computer and use it in GitHub Desktop.
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