0

I use ELCImagePickerController for select multiple images from photos app in my application. I want to delete those images from photos app selected by ELCImagePickerController. Please help me to solve this.

ELCImagePickerController allowed two methods.

- (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info;
- (void)elcImagePickerControllerDidCancel:(ELCImagePickerController *)picker;
Fabio Berger
  • 1,921
  • 2
  • 24
  • 29
Mitesh Dobareeya
  • 970
  • 1
  • 11
  • 36

1 Answers1

0

You will need to use the PHPhotoLibrary.

Using PHAssetChangeRequest

For my project I used this, and it is in swift, but I hope this will give you the right idea. This works perfectly for me:

PHPhotoLibrary.sharedPhotoLibrary().performChanges({
      PHAssetChangeRequest.deleteAssets(photoAssets)
      }, completionHandler: { success, error in
      NSLog("Completed deletion of asset. %@", (success ? "Success" : error!)) 
})

You would want to implement this in didFinishPickingMediaWithInfo

Hopefully this helps.

A. Petrizza
  • 3,202
  • 2
  • 15
  • 24