Skip to content

Example of passing a Blindside injector through a storyboard

License

Notifications You must be signed in to change notification settings

Raztor0/BlindsidedStoryboard

 
 

Repository files navigation

BlindsidedStoryboard

Storyboards make dependency injection of view controllers challenging, because they insist on instantiating the view controllers internally. This restriction can be worked around by subclassing UIStoryboard and overriding the -instantiateViewControllerWithIdentifier: method to perform configuration work immediately following the instantiation. The same storyboard instance that is used to create the initial view controller will be used to instantiate further view controllers accessed via segues.

This repo contains a BlindsidedStoryboard subclass of UIStoryboard which exemplifies this technique, integrating with the Blindside DI framework. It is a part of a small sample app demonstrating how this could be used.

The BlindsidedStoryboard(CrossStoryboardSegues) category can be included to allow for seamless integration with Cross Storyboard Segues

About

Example of passing a Blindside injector through a storyboard

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 39.5%
  • Objective-C 36.2%
  • Objective-C++ 24.3%