Skip to content

Commit

Permalink
Feat [#5] SceneDelegate 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
chaentopia committed May 31, 2023
1 parent f86fad9 commit 99943a5
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions BiBaBoo-iOS/BiBaBoo-iOS/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {


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 _ = (scene as? UIWindowScene) else { return }

// 1.
guard let windowScene = (scene as? UIWindowScene) else { return }
// 2.
self.window = UIWindow(windowScene: windowScene)
// 3.
let navigationController = UINavigationController(rootViewController: ViewController())
self.window?.rootViewController = navigationController
// 4.
self.window?.makeKeyAndVisible()
}


func sceneDidDisconnect(_ scene: UIScene) {
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
Expand Down

0 comments on commit 99943a5

Please sign in to comment.