0

I am using the method below to get an image. What is the 'info' format and how am I going to save it into NSURL? I want to save the NSURL of the image into my core data.

-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
           [picker dismissModalViewControllerAnimated:YES];
           self.photo = [info objectForKey:UIImagePickerControllerEditedImage];
}
aDev
  • 95
  • 1
  • 1
  • 11

1 Answers1

1

Here is the description of all the keys in the info dictionary (scroll down to the Constants section).

  • If you want the URL of the image, use UIImagePickerControllerReferenceURL.

  • If you want to save the image itself to your Core Data store, use UIImagePickerControllerOriginalImage or UIImagePickerControllerEditedImage, which will give you a UIImage object of the picture picked by user.

TotoroTotoro
  • 17,524
  • 4
  • 45
  • 76