샘성의 iOS 개발 일지

[Xcode] Storyboard 지우기 본문

iOS/Xcode

[Xcode] Storyboard 지우기

SamusesApple 2023. 3. 29. 12:32
728x90

1. main 스토리보드 파일 지우기 (휴지통에 꼭 넣자..)

 

 

2. Targets -> Info -> Custom iOS Target Properties -> Main storyboard file base name 지우기 (백버튼 누르면 됨)

 

 

3. Application SceneManifest -> Scene Configuration -> Application Session Role -> Item 0 -> Storyboard Name 지우기

 

 

4. SceneDelegate에 하단 코드 작성

    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 = CalendarViewController() // 시작할 VC 입력
        window.makeKeyAndVisible()
        self.window = window
    }

 

5. 테스트 하기

728x90