Renamed the StackRouter router in the Coordination library as StackRouter.
This commit is contained in:
parent
ea980bed75
commit
e290636ee8
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// File.swift
|
// StackRouter.swift
|
||||||
// ReviewsCoordinationKit
|
// ReviewsCoordinationKit
|
||||||
//
|
//
|
||||||
// Created by Javier Cicchelli on 21/03/2024.
|
// Created by Javier Cicchelli on 21/03/2024.
|
||||||
@ -8,14 +8,14 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
public class PushRouter: NavigationRouter {
|
public class StackRouter: BaseNavigationRouter {
|
||||||
|
|
||||||
// MARK: Constants
|
// MARK: Constants
|
||||||
private let rootViewController: UIViewController?
|
private let rootViewController: UIViewController?
|
||||||
|
|
||||||
// MARK: Initialisers
|
// MARK: Initialisers
|
||||||
public init(
|
public init(
|
||||||
navigationController: UINavigationController,
|
_ navigationController: UINavigationController,
|
||||||
rootViewController: UIViewController? = nil
|
rootViewController: UIViewController? = nil
|
||||||
) {
|
) {
|
||||||
self.rootViewController = navigationController.viewControllers.first ?? rootViewController
|
self.rootViewController = navigationController.viewControllers.first ?? rootViewController
|
||||||
@ -26,13 +26,13 @@ public class PushRouter: NavigationRouter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Router
|
// MARK: - Router
|
||||||
extension PushRouter: Router {
|
extension StackRouter: Router {
|
||||||
|
|
||||||
// MARK: Functions
|
// MARK: Functions
|
||||||
public func present(
|
public func present(
|
||||||
_ viewController: UIViewController,
|
_ viewController: UIViewController,
|
||||||
animated: Bool,
|
animated: Bool,
|
||||||
onDismiss: OnDismissClosure?
|
onDismiss: OnDismissClosure? = nil
|
||||||
) {
|
) {
|
||||||
onDismissForViewController[viewController] = onDismiss
|
onDismissForViewController[viewController] = onDismiss
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user