Image path access

I want to get a path image of photo albums from an iPhone device. and also I need an extension of this image with their name.

+1
source share
1 answer

I have not tried this, but look at the UIImagePickerControllerDelegate and method didFinishPickingMediaWithInfo. I thought the actual path to the image was hidden, but the dictionary infohas a key called UIImagePickerControllerReferenceURLthat looks like NSURL for the original image.

UIImagePickerControllerReferenceURL
The Assets Library URL for the original version of the picked item.
After the user edits a picked item—such as by cropping an image or trimming a movie—the URL continues to point to the original version of the picked item.
The value for this key is an NSURL object.
Available in iOS 4.1 and later.
Declared in UIImagePickerController.h

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
0
source

All Articles