Improved the signature of the functions for the WindowRouter router in the Coordination library.

This commit is contained in:
Javier Cicchelli 2024-03-21 19:44:30 +01:00
parent e290636ee8
commit 5408e2a48e

View File

@ -14,7 +14,7 @@ public class WindowRouter: Router {
private let window: UIWindow?
// MARK: Initialisers
public init(window: UIWindow?) {
public init(_ window: UIWindow?) {
self.window = window
}
@ -22,7 +22,7 @@ public class WindowRouter: Router {
public func present(
_ viewController: UIViewController,
animated: Bool,
onDismiss: OnDismissClosure?
onDismiss: OnDismissClosure? = nil
) {
window?.rootViewController = viewController
window?.makeKeyAndVisible()