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