Created
April 30, 2012 03:07
-
-
Save jamiepinkham/2555158 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 "JPImagePickerViewController.h" | |
@interface JPImagePickerViewController () | |
@end | |
@implementation JPImagePickerViewController | |
- (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)viewDidUnload | |
{ | |
[super viewDidUnload]; | |
// Release any retained subviews of the main view. | |
// e.g. self.myOutlet = nil; | |
} | |
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation | |
{ | |
return (interfaceOrientation == UIInterfaceOrientationPortrait); | |
} | |
- (IBAction)showPicker:(id)sender{ | |
UIImagePickerController *controller = [[UIImagePickerController alloc] init]; | |
[controller setModalPresentationStyle:UIModalPresentationCurrentContext]; | |
[self presentModalViewController:controller animated:YES]; | |
} | |
- (CGSize)contentSizeForViewInPopover{ | |
return CGSizeMake(320, 480); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment