Last active
June 8, 2022 18:15
-
-
Save adamzarn/c30e0921b075148716a59ab2b708c7d4 to your computer and use it in GitHub Desktop.
UIWindow Extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension UIWindow { | |
| func setRootViewController(_ viewController: UIViewController) { | |
| DispatchQueue.main.async { | |
| self.rootViewController = viewController | |
| self.makeKeyAndVisible() | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment