Skip to content

Instantly share code, notes, and snippets.

@jamiepinkham
Created April 30, 2012 03:07
Show Gist options
  • Save jamiepinkham/2555158 to your computer and use it in GitHub Desktop.
Save jamiepinkham/2555158 to your computer and use it in GitHub Desktop.
#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