Answer the question
In order to leave comments, you need to log in
Loading photo from camera roll in ImageView Xcode?
How to correctly load a photo into ImageView from the camera roll of the phone itself? (When you click on the button, of course)
Answer the question
In order to leave comments, you need to log in
#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 editing *)editingInfo
{
self.imageView.image = image;
[self dismissModalViewControllerAnimated:YES];
}
@end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question