In my main view controller I have a button that prompts the user to select a photo from their photo library then display it (img), which looks like this:
Code:
-(IBAction) getPhoto:(id) sender {
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentModalViewController:picker animated:YES];
[picker release];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
img.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
}
My question is how can I also display this selected image in a second view controller? I know how to go to a different view, I'm just unsure how to send an image to that view.
Any help is appreciated, cheers.