Ahmad J. Hamad
1 min readMay 31, 2019

A humble introduction to using coordinator pattern with UITabBarController

Writing a clean code can be a bit of a challenge. Writing a code that’s readable, extendable and maintainable is something we always strive for.

In this article I will explain how to use the coordinator pattern with UITabBarController in Swift, I will use Swinject as a dependency injection framework.

First, let’s start by writing our basic coordinator protocol.

Let’s create our concrete coordinators:

Let’s create our MainTabBarController that extends from UITabBarController

let’s wire it all together

And that’s it, the full source code can be downloaded from here

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Ahmad J. Hamad
Ahmad J. Hamad

Written by Ahmad J. Hamad

DevOps, systems engineer and coder

No responses yet

Write a response