Expose item, sourceIndexPath and destinationIndexPath in allowNewIndexPath

This commit is contained in:
Roman Efimov
2013-04-30 12:38:09 -05:00
parent 32ac1102c8
commit 42fbda0af1
3 changed files with 4 additions and 4 deletions

View File

@@ -92,8 +92,8 @@
for (NSInteger i = 1; i <= 5; i++) {
RETableViewItem *item = [RETableViewItem itemWithTitle:[NSString stringWithFormat:@"Section 5, Item %i", i] accessoryType:UITableViewCellAccessoryNone selectionHandler:nil];
item.movable = YES;
item.allowNewIndexPath = ^BOOL(NSIndexPath *newIndexPath) {
return (newIndexPath.section == section.index);
item.allowNewIndexPath = ^BOOL(id item, NSIndexPath *sourceIndexPath, NSIndexPath *destinationIndexPath) {
return (destinationIndexPath.section == section.index);
};
[section addItem:item];
}