Skip to content

giulio92/Coordinator

Repository files navigation


Concepts

A Coordinator is an object that manages iOS applications navigation flow while keeping UIViewControllers separate and independent.

By itself a Coordinator can only hold references to others Coordinators and to his parent coordinator (if available), to gain navigation flow management it must be paired with a UINavigationController or UITabBarController.

Choose one of the two protocols based on your navigation flow needs:

  • NavCoordinator
    Holding a UINavigationController

  • TabCoordinator
    Holding a UITabBarController

What a Coordinator should do

  • Push a UIViewController/UINavigationController/UTabBarController of another Coordinator
  • Create Couples object
  • Present Coordinators
  • Be invisible to UIViewControllers and only known by ViewModels
  • Hold Dependencies in case of Dependency Injection

What a Coordinator should not do

  • Perform anything other than navigation (i.e. network calls)

How to use Xcode Templates

  1. Close Xcode
  2. If not already present, create a folder named Source in the following path:
    ~/Library/Developer/Xcode/Templates/File Templates/
    
  3. Move the .xctemplates of choice in:
    ~/Library/Developer/Xcode/Templates/File Templates/Source/
    
  4. Open Xcode and try to create a new file with:
    Xcode > File > New > File...
    

Example project requirements

  • Xcode 10.0+
  • Swift 4.2+
  • iOS 8.0+

Image source requirements

  • Sketch 53+

Credits

About

A drop-in, ready to use, collection of Coordinator protocols

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages