-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some tests for how hidden/non-hidden views work with Frank
- Loading branch information
Showing
8 changed files
with
448 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// ViewPropertiesViewController.h | ||
// Controls | ||
// | ||
// Created by Pete Hodgson on 10/19/12. | ||
// Copyright (c) 2012 ThoughtWorks. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface ViewPropertiesViewController : UIViewController | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// | ||
// ViewPropertiesViewController.m | ||
// Controls | ||
// | ||
// Created by Pete Hodgson on 10/19/12. | ||
// Copyright (c) 2012 ThoughtWorks. All rights reserved. | ||
// | ||
|
||
#import "ViewPropertiesViewController.h" | ||
|
||
@interface ViewPropertiesViewController () | ||
@property (retain, nonatomic) IBOutlet UIButton *hideButton; | ||
@property (retain, nonatomic) IBOutlet UIView *blueSquare; | ||
@property (retain, nonatomic) IBOutlet UIView *orangeSquare; | ||
|
||
@end | ||
|
||
@implementation ViewPropertiesViewController | ||
|
||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
{ | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
// Custom initialization | ||
} | ||
return self; | ||
} | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
// Do any additional setup after loading the view from its nib. | ||
} | ||
|
||
- (void)didReceiveMemoryWarning | ||
{ | ||
[super didReceiveMemoryWarning]; | ||
// Dispose of any resources that can be recreated. | ||
} | ||
|
||
- (void)dealloc { | ||
[_hideButton release]; | ||
[_blueSquare release]; | ||
[_orangeSquare release]; | ||
[super dealloc]; | ||
} | ||
- (void)viewDidUnload { | ||
[self setHideButton:nil]; | ||
[self setBlueSquare:nil]; | ||
[self setOrangeSquare:nil]; | ||
[super viewDidUnload]; | ||
} | ||
|
||
- (IBAction)didTouchHideButton:(id)sender { | ||
|
||
if( self.blueSquare.hidden ){ | ||
self.blueSquare.hidden = false; | ||
[self.hideButton setTitle:@"Hide view" forState:UIControlStateNormal]; | ||
}else{ | ||
self.blueSquare.hidden = true; | ||
[self.hideButton setTitle:@"Show view" forState:UIControlStateNormal]; | ||
} | ||
} | ||
@end |
Oops, something went wrong.