Hanny
Hanny

Reputation: 1342

deleting a UIImage saved in Photo Album

Hi i am new to IPhone development. i have saved UIIMages on the IPhone Simulator's Photo Album using the following code.

    UIGraphicsBeginImageContext(self.view.frame.size);
    [self.view.layer  renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    UIImageWriteToSavedPhotosAlbum(viewImage, nil , nil, nil);

As i am able to delete them manually by explicitly going to Photo library and delete them one by one.
Now i am using the imagePickerController in my app to view those saved pics.
I want to delete the image when i select the delete button in my app.

I would appreciate help with some code.

Upvotes: 0

Views: 675

Answers (1)

Max
Max

Reputation: 16719

No it is not possible to do that. You can fake the photo album by creating your custom one. You have to save those photos somewhere in Documents or Library folder. Then you can do whatever you want. Here is the link to start.

Upvotes: 1

Related Questions