#import "ViewController.h"
@implementation ViewController
@synthesize imageView;
#pragma mark -
#pragma mark IBActions
- (IBAction) didTapButton:(id)sender
{
UIImagePickerController *pickerController = [[UIImagePickerController alloc]
init];
pickerController.delegate = self;
[self presentModalViewController:pickerController animated:YES];
}
#pragma mark -
#pragma mark UIImagePickerControllerDelegate
- (void) imagePickerController:(UIImagePickerController *)picker
didFinishPickingImage:(UIImage *)image
editingInfo:(NSDictionary *)editingInfo
{
self.imageView.image = image;
[self dismissModalViewControllerAnimated:YES];
}
@end