Storyboard has a component UIImageView * myImageView; To which I want to upload a picture from the gallery, but for some reason it does not work out, a menu with pictures opens, I select a picture and my myImageView does not display it.
Could you tell me more how to save back to the gallery.
Here is the code:
- (IBAction)pushBtnLoad:(id)sender { NSLog (@"pressed Btn Load"); UIImagePickerController *pickerC = [[UIImagePickerController alloc] init]; pickerC.delegate = self; [self presentViewController:pickerC animated:YES completion:nil]; } - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [self dismissViewControllerAnimated:YES completion:nil]; UIImage *gotImage = [info objectForKey:UIImagePickerControllerOriginalImage]; self.myImageView.image = gotImage; } - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { [self dismissViewControllerAnimated:YES completion:nil]; }