/iOS 📱
[iOS] 스토리보드 없이 개발하기
아렉스_Arex
2023. 8. 7. 12:06
반응형
Main 스토보드 삭제
프로젝트 → info.plist UISceneStoryboardFile 제거
Target → info.plist UIMainStoryboardFile 제거
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 windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: windowScene)
window?.windowScene = windowScene
window?.rootViewController = ViewController()
window?.makeKeyAndVisible()
}