Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@implementation MyViewController
+ (BSInitializer *)bsInitializer {
return [BSInitializer initializerWithClass:self
argumentKeys:@"myApi", nil];
- (instancetype)initWithApi:(MyApi *)myApi {
@interface MyBlindsideModule : NSObject<BSModule>
@implementation MyBlindsideModule
- (void)configure:(id<BSBinder>) binder {
MyApi *apiInstance = [[MyApi alloc] initWithEndpoint:@""];
[binder bind:@"myApi" toInstance:apiInstance];
MyBlindsideModule *module = [[MyBlindsideModule alloc] init];
id<BSInjector> injector = [Blindside injectorWithModule:module];
UIViewController *rootViewController = [injector getInstance:[MyViewController class]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment