Skip to content

Instantly share code, notes, and snippets.

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