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 "HomeViewPresenter.h" | |
#import "HomeView.h" | |
#import "HomeViewController.h" | |
#import "ImageViewController.h" | |
#import "ImageViewPresenter.h" | |
#import "UIImageHelper.h" | |
@interface HomeViewPresenter () { | |
UIImageHelper *imageHelper_; |
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 "HomeViewController.h" | |
#import "HomeView.h" | |
@implementation HomeViewController | |
@synthesize homeView = homeView_; | |
-(void)viewWillAppear:(BOOL)animated { | |
[[self navigationController] setNavigationBarHidden:YES animated:YES]; |
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
@class ViewController; | |
@interface Presenter : NSObject | |
@property(nonatomic, weak) ViewController *viewController; | |
- (void)viewLoaded; | |
- (NSArray *)leftNavigationButtons; | |
- (NSArray *)rightNavigationButtons; |
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 "Presenter.h" | |
@implementation Presenter | |
@synthesize viewController = viewController_; | |
- (void)viewLoaded { | |
// By default, do nothing. | |
} |
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 <UIKit/UIKit.h> | |
@class Presenter; | |
@interface ViewController : UIViewController | |
@property(readonly, nonatomic) Presenter *presenter; | |
// Designated initializer. | |
- (id)initWithPresenter:(Presenter *)presenter; |
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_; |
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 <OCMock/OCMock.h> | |
#import <XCTest/XCTest.h> | |
#import "Presenter.h" | |
#import "ViewController.h" | |
@interface PresenterTest : XCTestCase { | |
id mockViewController_; | |
Presenter *presenter_; | |
} |
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 <OCMock/OCMock.h> | |
#import <XCTest/XCTest.h> | |
#import "Presenter.h" | |
#import "ViewController.h" | |
@interface ViewControllerTest : XCTestCase { | |
id mockPresenter_; | |
ViewController *viewController_; | |
} |
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 "Presenter.h" | |
@class HomeViewController; | |
@class UIImageHelper; | |
@interface HomeViewPresenter : | |
Presenter<UIImagePickerControllerDelegate, UINavigationControllerDelegate> | |
+ (HomeViewController *)createViewController; |
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" | |
@class HomeView; | |
@interface HomeViewController : ViewController | |
@property(nonatomic, readonly) HomeView *homeView; | |
- (void)showImagePickerWithType:(UIImagePickerControllerSourceType)type | |
delegate:(id <UINavigationControllerDelegate, UIImagePickerControllerDelegate>)delegate; |
OlderNewer