1. 프로젝트 생성
2. 스토리보드 삭제
3. Info.plist 에서 Stroyboard Name 삭제
4. 프로젝트 설정 Build Settings에서 Info.plist Values에서 UIKit Main Stroyboard File Base Name 삭제
5. SceneDelegate.swift에서 시작 뷰컨트롤러 설정
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: windowScene)
// 시작할 뷰 컨트롤러 생성
let vc = ViewController()
// UI윈도우의 루트뷰 설정 및 보여주기
window?.rootViewController = vc
window?.makeKeyAndVisible()
}
func sceneDidDisconnect(_ scene: UIScene) {
}
func sceneDidBecomeActive(_ scene: UIScene) {
}
func sceneWillResignActive(_ scene: UIScene) {
}
func sceneWillEnterForeground(_ scene: UIScene) {
}
func sceneDidEnterBackground(_ scene: UIScene) {
}
}