Integrated the FeedListCoordinator and the AppCoordinator coordinators into the AppDelegate in the App target.
This commit is contained in:
parent
402a4933ca
commit
67c391dbba
@ -6,6 +6,7 @@
|
||||
// Copyright © 2020 ING. All rights reserved.
|
||||
//
|
||||
|
||||
import ReviewsCoordinationKit
|
||||
import ReviewsFeed
|
||||
import UIKit
|
||||
|
||||
@ -13,6 +14,7 @@ import UIKit
|
||||
class AppDelegate: UIResponder {
|
||||
|
||||
// MARK: Properties
|
||||
var coordinator: AppCoordinator?
|
||||
var window: UIWindow?
|
||||
|
||||
}
|
||||
@ -26,9 +28,19 @@ extension AppDelegate: UIApplicationDelegate {
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
coordinator = .init(router: WindowRouter(window))
|
||||
|
||||
guard let coordinator else {
|
||||
fatalError("AppCoordinator should have been instantiated")
|
||||
}
|
||||
|
||||
window?.rootViewController = UINavigationController(rootViewController: FeedListViewController())
|
||||
window?.makeKeyAndVisible()
|
||||
coordinator.present(animated: false)
|
||||
coordinator.present(
|
||||
child: FeedListCoordinator(
|
||||
router: StackRouter(coordinator.navigationController)
|
||||
),
|
||||
animated: false
|
||||
)
|
||||
|
||||
return true
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user