Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix reordering bug

  • Loading branch information...
commit 9f06292317f4784c7b8ba538577db6ca57d1012b 1 parent 164d177
@brunow authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 TableKit/TKTableModel.m
View
9 TableKit/TKTableModel.m
@@ -285,10 +285,15 @@ - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)
UITableViewCellEditingStyle editingStyle = [self tableView:tableView
editingStyleForRowAtIndexPath:indexPath];
+ BOOL canEdit = NO;
+
if (nil != cellMapping.canEditObjectBlock)
- return cellMapping.canEditObjectBlock(object, indexPath, editingStyle);
+ canEdit = cellMapping.canEditObjectBlock(object, indexPath, editingStyle);
- return NO;
+ if (nil != cellMapping.canMoveObjectBlock)
+ canEdit = canEdit || cellMapping.canMoveObjectBlock(object, indexPath);
+
+ return canEdit;
}
Please sign in to comment.
Something went wrong with that request. Please try again.