Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Specify root view controller of UIWindow in SceneDelegate
// Youtube: https://www.youtube.com/watch?v=7AlZxClmhPw
// Source: https://hashaam.com/2020/07/30/creating-camera-application-with-avfoundation/
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
window?.makeKeyAndVisible()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.