Skip to content

Instantly share code, notes, and snippets.

@gaeng2y
Last active April 13, 2022 09:39
Show Gist options
  • Save gaeng2y/a6b57a24616939dd56a826f9fbfe54a1 to your computer and use it in GitHub Desktop.
Save gaeng2y/a6b57a24616939dd56a826f9fbfe54a1 to your computer and use it in GitHub Desktop.
sceneDeleagte
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let windowScene = (scene as? UIWindowScene) else { return }
// 이전 글에서 추가했던 내용
window = UIWindow(frame: windowScene.coordinateSpace.bounds)
window?.windowScene = windowScene
window?.rootViewController = ViewController()
window?.makeKeyAndVisible()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment