Last active
August 16, 2020 16:56
-
-
Save hashaam/d9f62f19f5d1f98d4568ae0b01902c38 to your computer and use it in GitHub Desktop.
Specify root view controller of UIWindow in SceneDelegate
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
// 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