[App] Integrated the Feed List to the App with coordinators #16

Merged
javier merged 6 commits from framework/feed/coordinators into main 2024-03-21 18:52:53 +00:00
Showing only changes of commit 67c391dbba - Show all commits

View File

@ -6,6 +6,7 @@
// Copyright © 2020 ING. All rights reserved. // Copyright © 2020 ING. All rights reserved.
// //
import ReviewsCoordinationKit
import ReviewsFeed import ReviewsFeed
import UIKit import UIKit
@ -13,6 +14,7 @@ import UIKit
class AppDelegate: UIResponder { class AppDelegate: UIResponder {
// MARK: Properties // MARK: Properties
var coordinator: AppCoordinator?
var window: UIWindow? var window: UIWindow?
} }
@ -26,9 +28,19 @@ extension AppDelegate: UIApplicationDelegate {
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool { ) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds) window = UIWindow(frame: UIScreen.main.bounds)
coordinator = .init(router: WindowRouter(window))
window?.rootViewController = UINavigationController(rootViewController: FeedListViewController()) guard let coordinator else {
window?.makeKeyAndVisible() fatalError("AppCoordinator should have been instantiated")
}
coordinator.present(animated: false)
coordinator.present(
child: FeedListCoordinator(
router: StackRouter(coordinator.navigationController)
),
animated: false
)
return true return true
} }