Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect if delete button UItableviewcell was hidden?

I have a view that contains a UITableView. I'm able to show the delete button on the cell when the user swipes.

If the user touches the delete button a method will be triggered (this works fine). But if the user decides to not to delete the cell and he touches anywhere in the view to hide the delete button.

How can I detect that?

like image 824
Kassem Avatar asked May 17 '12 08:05

Kassem


2 Answers

When the user taps outside the delete mark in a cell, your program should receive a call to tableView:didEndEditingRowAtIndexPath: on the table view delegate.

like image 193
Sergey Kalinichenko Avatar answered Sep 21 '22 20:09

Sergey Kalinichenko


[UITableViewCell showingDeleteConfirmation]

or

[UITableViewCell willTransitionToState:] with UITableViewCellStateShowingDeleteConfirmationMask as parameter

like image 39
Sulthan Avatar answered Sep 21 '22 20:09

Sulthan