To reproduce:
- implement
tableView: targetIndexPathForMoveFromRowAtIndexPath: toProposedIndexPath: in table view delegate
- try to drag off the bottom of the table
- crash
The crash is in HPReorderTableView.m, - (void)updateCurrentLocation:(UILongPressGestureRecognizer *)gesture. toIndexPath is nil which results in a crash. A possible fix is:
if ([self.delegate respondsToSelector:@selector(tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath:)])
{
if (toIndexPath == nil) {
return;
}
toIndexPath = [self.delegate tableView:self targetIndexPathForMoveFromRowAtIndexPath:_reorderInitialIndexPath toProposedIndexPath:toIndexPath];
}
To reproduce:
tableView: targetIndexPathForMoveFromRowAtIndexPath: toProposedIndexPath:in table view delegateThe crash is in HPReorderTableView.m,
- (void)updateCurrentLocation:(UILongPressGestureRecognizer *)gesture.toIndexPathis nil which results in a crash. A possible fix is: