[Library] Coordination library #15

Merged
javier merged 7 commits from library/coordination into main 2024-03-21 16:40:31 +00:00
Showing only changes of commit 1b4fde9adb - Show all commits

View File

@ -0,0 +1,42 @@
//
// Router.swift
// ReviewsCoordinationKet
//
// Created by Javier Cicchelli on 21/03/2024.
// Copyright © 2024 Röck+Cöde. All rights reserved.
//
import UIKit
public protocol Router: AnyObject {
// MARK: Type aliases
typealias OnDismissClosure = () -> Void
// MARK: Functions
func present(
_ viewController: UIViewController,
animated: Bool,
onDismiss: OnDismissClosure?
)
func dismiss(animated: Bool)
}
// MARK: - Implementations
public extension Router {
// MARK: Functions
func present(
_ viewController: UIViewController,
animated: Bool
) {
present(
viewController,
animated: animated,
onDismiss: nil
)
}
}