
스토리보드에서 initial 화살표를 옮기면 되지만, 그렇게되면 의존성 주입을 할 수 없게 된다.
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let _ = (scene as? UIWindowScene) else { return }
let storage = MemoryStorage()
let coordinator = SceneCoordinator(window: window!)
let listViewModel = MemoListViewModel(title: "나의 메모", sceneCoordinator: coordinator, storage: storage)
let listScene = Scene.list(listViewModel)
coordinator.transition(to: listScene, using: .root, animated: true)
}
...
}