NSIndexPath *sourceIndexPath = [_mainTableView indexPathForCell:cell];
NSIndexPath *destinationIdexPath = [NSIndexPath indexPathForRow:2 inSection:(2)];
[CATransaction begin];
[CATransaction setCompletionBlock:^{
// Your completion code here
[_mainTableView reloadData];
}];
//一定要加上这个,否则不同机型可能会有崩溃
[_mainTableView beginUpdates];
[_mainTableView moveRowAtIndexPath:sourceIndexPath toIndexPath:destinationIdexPath];
[_mainTableView endUpdates];
[CATransaction commit];