Swap rootViewController with animation?

You can use UIView.transition(with: view) to replace the rootViewController of a UIWindow: guard let window = UIApplication.shared.keyWindow else { return } let storyboard = UIStoryboard(name: “Main”, bundle: nil) let vc = storyboard.instantiateViewController(withIdentifier: “MainTabbar”) // Set the new rootViewController of the window. // Calling “UIView.transition” below will animate the swap. window.rootViewController = vc // A mask … Read more