Implementation of Mediator pattern to control screens flow.
Requires Swift 4.2
Add this line into your Cartfile and run carthage update
github "valnoc/Coordinator" ~> 1.0
Check these articles (part1, part2) to get the idea of what coordinator is.
In short, a coordinator is a mediator between several screens or between other coordinators (screens flow). It opens ViewControllers and other coordinators. All screens are developed to be totally independent from each other. A ViewController is never opened from another one - only coordinator should do this.
You create a hierarchy of coordinators starting with the AppCoordinator. He "knows" which flow should be first depending on situation.
Coordinator is available under MIT License.