I'm using the "swipe-to-delete" functionality in my UITableView. It worked without problems in the past.
Since I updated my project to iOS7, the cell does not exit the "swiped" state. So when I click the delete button, -tableView:commitEditingStyle:forRowAtIndexPath: gets called, but it does not hide the button again.
Do I need to do that manually since iOS7? If yes, what method do I have to use?
I'm having same problem. The problem is the delegate method tableView:didEndEditingRowAtIndexPath: it isn't more called (don't know why).
the way that I found is call the [tableview reloadData] inside of tableView:commitEditingStyle:forRowAtIndexPath: instead of in tableView:didEndEditingRowAtIndexPath: . This works in iOS 6 and 7.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
[myDataSource removeObjectAtIndex:indexPath.row];
[myTable reloadData];
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With