开发者

Accessing Image Path

I want to get the Path a image of the photo albums from the iPhone device. and also i need 开发者_Python百科the extension of that image with their name.


I've not tried this, but take a look at UIImagePickerControllerDelegate and the didFinishPickingMediaWithInfo method. I thought the actual path to the image was hidden, but the info Dictionary has a key called UIImagePickerControllerReferenceURL which looks like it might be a NSURL to 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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜