Created
February 21, 2021 18:59
-
-
Save roz0n/85a98c164d281d4375f25be3b7eae930 to your computer and use it in GitHub Desktop.
iOS SceneDelegate Programmatic UI Setup
This file contains 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
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | |
guard let scene = (scene as? UIWindowScene) else { return } | |
let vc = ViewController() | |
let nc = UINavigationController(rootViewController: vc) | |
window = UIWindow(frame: scene.coordinateSpace.bounds) | |
window?.windowScene = scene | |
window?.rootViewController = nc | |
window?.makeKeyAndVisible() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment