mirror of
https://github.com/zhigang1992/RETableViewManager.git
synced 2026-04-27 00:01:02 +08:00
Expose item, sourceIndexPath and destinationIndexPath in allowNewIndexPath
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user