From 374ad70ad94e3fd400a5986608e760b865577508 Mon Sep 17 00:00:00 2001 From: Dmitry Lavlinskyi Date: Fri, 13 Mar 2015 11:37:35 +0200 Subject: [PATCH] fixes do not remove cell when the delete button tapped --- RETableViewManager/RETableViewManager.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RETableViewManager/RETableViewManager.m b/RETableViewManager/RETableViewManager.m index fb380d2..c7a365f 100755 --- a/RETableViewManager/RETableViewManager.m +++ b/RETableViewManager/RETableViewManager.m @@ -320,8 +320,8 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd RETableViewItem *item = [section.items objectAtIndex:indexPath.row]; if (item.deletionHandlerWithCompletion) { item.deletionHandlerWithCompletion(item, ^{ - [section removeItemAtIndex:indexPath.row]; - [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; +// [section removeItemAtIndex:indexPath.row]; +// [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; for (NSInteger i = indexPath.row; i < section.items.count; i++) { RETableViewItem *afterItem = [[section items] objectAtIndex:i]; @@ -332,8 +332,8 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd } else { if (item.deletionHandler) item.deletionHandler(item); - [section removeItemAtIndex:indexPath.row]; - [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; +// [section removeItemAtIndex:indexPath.row]; +// [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; for (NSInteger i = indexPath.row; i < section.items.count; i++) { RETableViewItem *afterItem = [[section items] objectAtIndex:i];