title: How to rearrange UITableView with custom cells?
body: <p>I have a table view with custom cells. The cells are filled with my data.
  Now I want to enable the user to rearrange the rows. I have implemented the methods, but while dragging to reorder the cell, I can see it shows like it is trying to do but cannot move anywhere. It moves like 10 pixel as if it will do the rearrange but goes back to its position. How to reorder the rows with custom cell?</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath 
  {
      if (editingStyle == UITableViewCellEditingStyleDelete)  
      {
         [self.dataSource removeObjectAtIndex:indexPath.row];
         [tableView reloadData];
      }
  }
  
  -(UITableViewCellEditingStyle)tableView:(UITableView*)tableView editingStyleForRowAtIndexPath:(NSIndexPath*)indexPath 
  {
      if (self.mytableView.editing) 
      {
              return UITableViewCellEditingStyleDelete;
      }
      return UITableViewCellEditingStyleNone;
  }
  
  -(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath 
  {
      return YES;
  }
  
  -(BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath 
  {
      return YES;  
  }
  
  -(void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath 
  {
      id stringToMove = [self.dataSource objectAtIndex:sourceIndexPath.row];
  
      [self.dataSource removeObjectAtIndex:sourceIndexPath.row];
  
      [self.dataSource insertObject:stringToMove atIndex:destinationIndexPath.row];
  }
  
  -(NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath 
  {
      if (proposedDestinationIndexPath.section != sourceIndexPath.section) 
      {
              return sourceIndexPath;
      }
      return proposedDestinationIndexPath;
  }
  </code></pre>