Skip to content

Instantly share code, notes, and snippets.

@catehstn
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catehstn/ed23a590b9c9025c0dc4 to your computer and use it in GitHub Desktop.
Save catehstn/ed23a590b9c9025c0dc4 to your computer and use it in GitHub Desktop.
#import "ViewController.h"
#import "Presenter.h"
@implementation ViewController {
Presenter *presenter_;
}
@synthesize presenter = presenter_;
- (id)initWithPresenter:(Presenter *)presenter {
self = [super init];
if (self) {
presenter_ = presenter;
[presenter setViewController:self];
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
[[self navigationItem] setLeftBarButtonItems:[[self presenter] leftNavigationButtons]
animated:YES];
[[self navigationItem] setRightBarButtonItems:[[self presenter] rightNavigationButtons]
animated:YES];
[presenter_ viewLoaded];
}
- (void)dismissViewControllerAnimated:(BOOL)animated
withCompletionBlock:(void (^)(void))completionBlock {
[[self navigationController] dismissViewControllerAnimated:animated
completion:completionBlock];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment