Refactoring iOS app with Coordinator Pattern for Navigation

Alfian Losari
Swift2Go
Published in
5 min readMay 16, 2019

--

Refactoring iOS MVC app with Coordinator Pattern

You can also read this article in my Xcoding With Alfian blog website using the link below.

In a typical iOS app that uses MVC as the architecture, the View Controller has to handle the navigation between other View Controllers. It means that the View Controller must know in advance the other controllers that it will navigate to. This creates a tight coupling between the controllers that we should avoid whenever possible.

This approach also add additional responsibility for the View Controller thus violating the single responsibility principle (SRP).

Enter the Coordinator Pattern

In recent years, there is a new pattern that emerges to solve this navigation problem, it’s called the Coordinator pattern. Here are the breakdown…

--

--

Alfian Losari
Swift2Go

Mobile Developer and Lifelong Learner. Currently building super app @ Go-Jek. Xcoding with Alfian at https://alfianlosari.com