Last active
August 29, 2015 14:03
-
-
Save augustj/c0a5496671e0eeede238 to your computer and use it in GitHub Desktop.
CFStoryboard.m - UIStoryboard subclass that injects Objection dependcies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "Objection.h" | |
#import "CFStoryboard.h" | |
@implementation CFStoryboard | |
- (id)instantiateViewControllerWithIdentifier:(NSString *)identifier | |
{ | |
NSLog(@"Injecting objects into UIViewController with identifier %@", identifier); | |
UIViewController *controller = [super instantiateViewControllerWithIdentifier:identifier]; | |
[[JSObjection defaultInjector] injectDependencies:controller]; | |
return controller; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment