Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Specify root view controller of UIWindow in SceneDelegate
// Youtube:
// Source:
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let _ = (scene as? UIWindowScene) else { return }
let nibName = String(describing: LaunchViewController.self)
let bundle = Bundle.main
let launchViewController = LaunchViewController(nibName: nibName, bundle: bundle)
window?.rootViewController = launchViewController
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment