I needed to be able to conditionally disable re-ordering of certain rows. Since the UITableViewDataSource protocol already has the method tableView:canMoveRowAtIndexPath: I decided that would be the cleanest way to check if a row can be moved or not. The method is only checked if the dataSource implementation implements it.
At the start of the long press gesture, if the dataSource implements tableView:canMoveRowAtIndexPath: and it returns NO then the gesture is cancelled.
Thanks for the pull request. Looks good! Was working on this exact thing the other week but didn't have time to fully test and commit. You beat me to it.
I needed to be able to conditionally disable re-ordering of certain rows. Since the
UITableViewDataSource
protocol already has the methodtableView:canMoveRowAtIndexPath:
I decided that would be the cleanest way to check if a row can be moved or not. The method is only checked if the dataSource implementation implements it.At the start of the long press gesture, if the dataSource implements
tableView:canMoveRowAtIndexPath:
and it returns NO then the gesture is cancelled.