iOS app demonstrates the Coordinator design pattern using both traditional Delegation and RxSwift / RxCocoa.
This iOS app demonstrates the Coordinator design pattern using both traditional Delegation and RxSwift / RxCocoa as internal communication mechanisms.
The app is composed of 3 independent UIViewController classes and a Controller class. The 3 UIViewControllers display 3 different app state:
The Controller class, called AppController
, is reponsible for moving the app through it’s different defined states by reponding to events from the app.
It is a purposely simple app that mirrors the usual Loading-Master-Detail flow of many apps today. At start time the Loading Screen is displayed and after 2 seconds elapse it notifies the AppCoordinator which then displays the Master Screen. The Master Screen consists of a single button that loads a Detail Screen via the AppCoordinator. From the Detail Screen there are 3 different ways (Navigation Controller back button, Button via Delegation and Button via Rx) to return to the Master Screen. Note that the Button via Rx is only implemented as of v1.0-rx
and is the only Rx implementation in the app.
v1.0
CoordinateThis.xcodeproj
using Xcode 9.4.1. v1.0-rx
CoordinateThis.xcworkspace
using Xcode 9.4.1.ipa
files.Copyright (c) 2018 Brad Leege