Closed stoprocent closed 10 years ago
It's just a dataSource and dataSource method which can prevent from dragging rows between sections etc. For example if I want to allow moving rows in same section:
- (BOOL)canMoveRowFromIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { if (fromIndexPath.section == toIndexPath.section) { return YES; } return NO; }
You can already use the built in table view delegate method tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath: for this.
tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath:
Apple Docs
Oh nice ... skipped that :)
It's just a dataSource and dataSource method which can prevent from dragging rows between sections etc. For example if I want to allow moving rows in same section: