Skip to content

Implementation of Mediator pattern to control screens flow.

License

Notifications You must be signed in to change notification settings

valnoc/Coordinator

Repository files navigation

Coordinator

License

SPM compatible SPM version

Cocoapods release Carthage compatible

Implementation of Mediator pattern to control screens flow.

Installation

Requires Swift 5

SPM

Add this line into your Package file

.package(url: "https://github.com/valnoc/Coordinator", from: "1.0"),

Cocoapods

Add this line into your Podfile under a test target and run pod update

pod 'VBCoordinator', '~> 1.0'

Carthage

Add this line into your Cartfile and run carthage update

github "valnoc/Coordinator" ~> 1.0

Usage

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.

License

Coordinator is available under MIT License.