From the course: iOS App Development: Design Patterns for Mobile Architecture

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Swinject storyboard

Swinject storyboard

From the course: iOS App Development: Design Patterns for Mobile Architecture

Start my 1-month free trial

Swinject storyboard

- [Narrator] The next place to take a look at in order to understand a little bit more about Swinject, is this SwinjectStoryboard plus Extensions swift. At the beginning of your applications, Swinject does some magic in order to get involved in the Storyboard creation process. This is required if you want to do any initialization or use the first View Controller at all within Swinject. Again, a lot of this is boilerplate code. Let's go head and collapse that left side so we can see this code a little more concisely. So, this setup method is culled, at the beginning of the whole application process. You don't need to understand how it happens, you just need to understand that it actually happens. So, at some point in the app creation process, we begin in the setup method, and we check to see if the dependencyRegistry is nil. And if it is nil, we'll go ahead and create a new one. Again, that container that we talked about, we're just using the defaultContainer. And this defaultContainer…

Contents