Future-Proof Dependency Injection for Storyboard-Based View Controllers


One of the issues introduced by storyboards is that they make it impossible to pass dependencies to view controllers in initializers. I proposed an API modification in past that would allow for exactly that, but alas, it doesn’t seem to be high on the priority list for UIKit. I recently came up with a new approach leveraging code generation which I’m excited to show you today.


Want to receive more content like this in your inbox?