UIImagePickerController with delete option?

How to delete an image from my App with UIImagePickerController?

For example, swipe UIImagePickerController on the left to display a delete button?

Replies

Not sure to understand what you expect.


Images shown by UIImagePicker are the images stored in user photo gallery notably.

You want to delete some of them ?


It should be impossible, as that would be a risk to delete accidentally (imagine your app is bugged and destroy images).


Note: this post would better be in CocoaTouch section.

Yes, in my App, I use imagePicker to display a photo, sometimes, user might want to delete that photo for that record.

Should I add a separate button to do that, which is ugly.

If you look at the Photos app, that's what they do:

- You can only delete once selected

- then you have a button (basket icon) at the bottom to remove.


In your case, photos are from the Photos Gallery of the phone ? You can select a photo, but are you sure you can remove ?

Once a photo picked from photo library, it was copied over and it became my app's private photo file.

I will add a button below the UIImagePickerController to remove,

I was thinking to do it within UIImagePickerController (ie. pick nothing) , seemed no way.

That's clear.


So, can't you create a swipe gesture on the ImageView ? Programmatically.

That's my question, a guesture with left swipe and bringing a delete button,

just like the one in tableview list, I was wondering if it was already supported by Apple?

Can you show the complete code where you create and use gesture ?


What do you get presently as result of Swipe ?