views:

1630

answers:

3

I am saving images to the photo library and would like to retrieve them dynamically to display in future launches of my app. I use the WriteToSavedPhotosAlbum function, as below, but do not get any info to access the saved photo programmatically.

UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo);

Once saved, is there a way to retrieve the file name/id and load an image from the photo library at a later time?

+2  A: 

You can't, unless the user picks the photo using the UIImagePickerController. Check this related question

Marco Mustapic
+2  A: 

You just need to save them for yourself. Possibly in your app's documents or cache folder.

As a side note, when you say: "display at launch", if you mean to replace the Default.png, that won't work.

The launch image must be static and included in your app bundle.

If not, disregard.

Corey Floyd
That's what I was afraid of. By "display at launch" I just meant load one of them in the initial view on display.
Arrel
Default.png can be a symbolic link to something outside the bundle, though. http://collison.ie/blog/2008/11/dynamic-defaultpng-files-on-the-iphone
jleedev
A: 

try this code segment make the necessay changes

UIImagePickerController *picker=[[UIImagePickerController alloc] init];

picker.delegate=pickerDelegate;

picker.sourcetype=UIImagepickerControllerSourceTypePhtoLibrary;

Ankit Sachan