Skip to content

Commit

Permalink
Feat [#3] Scenedelegate 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
chaentopia committed May 31, 2023
1 parent 30d71d8 commit 0ecd454
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions BiBaBoo-iOS/BiBaBoo-iOS/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {

var window: UIWindow?



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: HomeViewController())
self.window?.rootViewController = navigationController
// 4.
self.window?.makeKeyAndVisible()
}

func sceneDidDisconnect(_ scene: UIScene) {
Expand Down

0 comments on commit 0ecd454

Please sign in to comment.