My UITableView has 3 sections. Only the cells in the 2nd sections are movable:
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
BOOL canMove = NO;
if (indexPath.section == 1) {
canMove = YES;
}
return canMove;
}
However, a cell (B) in the 2nd section (originally contains A``B``C cells) can be moved to the 1st section (originally contains only the T cell):

How can I make sure cells are moved within its own section?
I think this will solve your problem
From Apple documentation