top of page

Build Scalable Multi-Flow iOS Apps with Coordinators, MVVM, and SwiftUI

Updated: 6 days ago

In the previous post, we introduced the Coordinator pattern and showed how to implement a simple home-to-detail navigation flow using UIKit for navigation and SwiftUI for views.

But real-world apps often have multiple user flows, each with its own set of screens.


To make navigation scalable and maintainable, we can use sub-coordinators (aka: child coordinators)—a perfect fit for complex navigation requirements. In this step-by-step guide, we’ll build a more advanced example: a multi-flow app with a registration flow and main app flow.


Lets begin!


What we’re building


We’ll implement two separate navigation flows, each managed by sub-coordinators:

  1. Registration Flow: A sequence of onboarding screens:

    • Sign Up

    • Profile Setup

    • Welcome

  2. Main App Flow: A standard list-to-detail flow:

    • Home Screen

    • Detail Screen


These flows will be managed by a RootCoordinator, which determines where the user starts and switches between flows as needed.

Here is a basic demonstration of the entire flow in action:




Why Sub-Coordinators?


When apps grow, navigation logic can quickly get out of hand. Sub-coordinators allow us to:

  • Isolate the navigation logic for specific user flows (e.g., registration vs main app), keeping our flows independent from each other.

  • Improve maintainability by enforcing separation of concerns.

  • Easily reuse and test flows independently.


The Root Coordinator


We will begin at the highest level and dig down as we progress. We will have a RootCoordinator which will be solely responsible for moving users between two flows: from the registration flow to the main app flow.


It will conform to the Coordinator protocol we introduced in the previous post: Intro to the Coordinator pattern with SwiftUI and UIKit. You can find the definition below:

Join my newsletter for exclusive iOS development insights, tips, and a 25% discount on any subscription plan!

        Want to read more?

        Subscribe to curiousalgorithm.com to keep reading this exclusive post.

        Site
        Join the growing community of iOS engineers who are taking their skills to the next level.

        © 2025 Curious Algorithm. All rights reserved.

        bottom of page