import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow? // ์ฑ์ ์์ํ ๋ ์ธํ
ํด์ค ์ฝ๋๋ฅผ ์์ฑํ๋ ๊ณณ.
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// UIWindow ๊ฐ์ฒด ์์ฑ.
guard let windowScene = (scene as? UIWindowScene) else { return }
let window = UIWindow(windowScene: windowScene)
//์ด๊ธฐ ๋ทฐ ์ปจํธ๋กค๋ฌ ์ค์
var navigationController = UINavigationController(rootViewController: MainViewController())
window.rootViewController = navigationController
// ์ด ๋ฉ์๋๋ฅผ ๋ฐ๋์ ์์ฑํด์ค์ผ ์๋์ฐ๊ฐ ํ์ฑํ ๋จ.
window.makeKeyAndVisible()
self.window = window
}
}
'๐ iOS > Swift' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[ Swift ] ํ๋กํ ์ฝ(protocol) (0) | 2024.08.25 |
---|---|
[ Swift ] ํ๋กํผํฐ(Property) / NetworkManager์ shared (0) | 2024.08.24 |
register(_:forCellWithReuseIdentifier:) ๋ฉ์๋์์ PosterCell.self๋ฅผ ์ฌ์ฉํ๋ ์ด์ (1) | 2024.08.04 |
[ Swift ๊ธฐ์ด ๋ฌธ๋ฒ ] ์ ๋ค๋ฆญ(Generics) (0) | 2024.07.31 |
[ Swift ] init๊ณผ required init?์ ๋ํด์ (0) | 2024.07.21 |