Last active
August 29, 2015 14:08
-
-
Save catehstn/ed23a590b9c9025c0dc4 to your computer and use it in GitHub Desktop.
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 "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