Skip to content

Commit 9f36168

Browse files
authored
Merge pull request #10 from GoodRequest/generic-start
feat: Add generic start method to Coordinator protocol
2 parents 0f5b7e3 + a4ea101 commit 9f36168

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/LegacyReactor/Coordinator.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ import UIKit
2222
///Coordinator's root `UIViewController`
2323
var rootViewController: UIViewController? { get set }
2424

25+
/// Calls the default, parameter-less implementation of `start` function, returning the view controller
26+
/// this coordinator manages. This is useful when navigating to a coordinator of an unknown type,
27+
/// not requiring casting to a concrete type first.
28+
@discardableResult
29+
func start() -> UIViewController?
30+
2531
}
2632

2733
extension Coordinator {

0 commit comments

Comments
 (0)