I would like to know when the user applies swipe actions on cells of a UITableView
. As per the doc, the UITableViewDelegate
methods should I use are the following:
- (void)tableView:(UITableView *)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath;
- (void)tableView:(UITableView *)tableView didEndEditingRowAtIndexPath:(NSIndexPath *)indexPath;
The willBegin...
is called once while the didEnd...
is called twice. Is there any reason for this?
My goal is to know when the user has performed a swipe gesture on a cell, followed by a cancel one (he doesn't want to delete anything). This in order to restore the previous selected cell if no action was performed (as per UITableView loses selection).
Any hints?