Chapter 11: Easy Navigation with Coordinators
An iOS app is usually a collection of single screens somehow connected to each other. Inexperienced developers often present a view controller from another view controller, because this is easy to implement and it is often shown that way in tutorials and demo code. But, for apps that need to be maintained over a long period of time, we need a pattern that is easier to understand and easier to change.
The coordinator pattern is very easy to implement and still manages to decouple the navigation between views of the app from the presentation of the information. In the coordinator pattern, a structure called a coordinator is responsible for navigating between views. View controllers tell the coordinator ...
Get Test-Driven iOS Development with Swift - Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.