mhacks-ios
mhacks-ios copied to clipboard
Create dedicated coordinator to manage view controller transitions
Depends on #26
Currently we are using storyboards with segues to manage view controller transitions
I propose moving to a dedicated coordinator object to handle transitions between view controllers. This AppCoordinator will be instantiated in the AppDelegate and manage all view controllers. It's initializer will create the initial view controller hierarchy (e.g. UITabBarController -> UINavigationController -> UIViewController (x5)).
It will have a hierarchical coordination system:
AppCoordinator: CalendarCoordinator MapsCoordinator CountdownCoordinator AnnouncementsCoordinator TicketCoordinator
Each view controller with transition activating events (like tapping a table view cell) will have its own coordination delegate defined with methods such as calendarViewController:didSelectEvent:
that will be implemented by its designated coordinator to manage the instantiation and transition to EventViewController
with that particular event.
Goals
- Prevent view controllers from knowing their surrounding context
- Isolate view controllers for clean unit/UI testing
- Allow for easy restructuring of app view hierarchy for flow changes and easier testing during development