


func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
let window = UIWindow(windowScene: windowScene)
window.rootViewController = ViewController() // 진입 뷰 컨트롤러 지정
self.window = window
window.makeKeyAndVisible()
}하세요
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow? // 윈도우 참조 변수
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// UIWindow 생성
window = UIWindow(frame: UIScreen.main.bounds)
// 진입 뷰 컨트롤러 설정
let rootVC = ViewController()
window?.rootViewController = UINavigationController(rootViewController: rootVC)
window?.makeKeyAndVisible()
return true
}
}