siasl
siasl

Reputation: 487

Help required with TableView swipe delete

I am trying to implement SMS kind of swipe and delete functionality.

In case of SMS application, an Edit button is on the left side of the navigation bar. When a swipe is attempted on a row, the Edit button changes to a Done button. If you click on Done button, the Delete mode is cancelled. If you click anywhere else on the tableview or scroll, the Delete mode is canceled again.

In my case, I am implementing willBeginRowEditing and didEndRowEditing as per the documentation to change view in case of swipe delete. I change Edit to Done in willBeginRowEditing and change it back in didEndRowEditing. Any scroll or any other touch automatically results in swipe delete cancellation.

But I do not seem to understand how to come out of the Delete mode when the user clicks on Done button. If I just change the editing mode for the tableView, didEndEditingRow is not called.

Is there any API to come out of swipe Delete mode?

Please let me know.

Upvotes: 0

Views: 1283

Answers (1)

Daniel
Daniel

Reputation: 22395

Why do you want them to hit done when they use swipe delete method and want to cancel it?? If they are swipe deleting and want to undo it then they just swipe again...

Upvotes: 1

Related Questions