[Setup] App architecture #9

Merged
javier merged 18 commits from setup/app-architecture into main 2023-04-11 22:14:40 +00:00
Showing only changes of commit b4b99dfa87 - Show all commits

View File

@ -6,15 +6,17 @@
// Copyright © 2023 Röck+Cöde. All rights reserved. // Copyright © 2023 Röck+Cöde. All rights reserved.
// //
import Core
import UIKit import UIKit
import CoreData
@main @main
class AppDelegate: UIResponder, UIApplicationDelegate { class AppDelegate: UIResponder, UIApplicationDelegate {
// MARK: Properties // MARK: Properties
var window: UIWindow? = .init(frame: UIScreen.main.bounds) lazy var coordinator: LocationsListCoordinator = .init(router: router)
lazy var router: WindowRouter = .init(window: window)
lazy var window: UIWindow? = .init(frame: UIScreen.main.bounds)
// MARK: UIApplicationDelegate // MARK: UIApplicationDelegate
@ -22,8 +24,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
_ application: UIApplication, _ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool { ) -> Bool {
window?.rootViewController = ViewController() coordinator.present(animated: true, onDismiss: nil)
window?.makeKeyAndVisible()
return true return true
} }