view source
Using Objection with UIViewControllers and Storyboards
I have used Objection in several iOS projects as a lightweight Dependency Injection framework. If you’re not familiar with it, take a look. One pain point has been how to inject dependencies for UIViewControllers that are in storyboards. Your controllers are likely instantiated through segues or by calling instantiateViewControllerWithIdentifier on a storyboard instance. Wouldn’t it be nice to have Objection inject the declared dependencies from its context on these controllers?
Advertisement