Created
April 21, 2010 07:23
-
-
Save NYiPhoneDeveloper/373533 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
- (void)viewDidLoad | |
{ | |
[segmentControl addTarget: self action: @selector(segmentChanged:) forControlEvents: UIControlEventValueChanged]; | |
[super viewDidLoad]; | |
} | |
-(IBAction) segmentChanged: (id) sender | |
{ | |
NSInteger segmentChoice = [segmentControl selectedSegmentIndex]; | |
if (segmentChoice == 0) | |
{ | |
[[self view1] setHidden: NO]; | |
[self.view2 setHidden: YES]; | |
} | |
else | |
{ | |
[self.view1 setHidden: YES]; | |
[[self view2] setHidden: NO]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment