Pregunta

I have created an Application that fetches Images from the photo library of the phone and displays it on a collection view. Now, I want that whenever the user selects an image and click on a delete button that particular image gets deleted from the collection view as well as from the image library. I am using ALAssetLibrary to fetch the images. I searched a lot but did not find any way to delete the image from the photo library.

Can anybody tell me that how I can delete a photo from photo library programmatically from my application.

¿Fue útil?

Solución

You can copy files from the gallery into your application's file system sandbox, where you can do anything you want with them. However, your application can't modify files outside the sandbox. This includes files in the gallery.

As this answer says, there doesn't appear to be a method defined for deleting photos there.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top