title: iPhone: sectioned UITableView rendering glitch with insertRowsAtIndexPaths
body: <p>I hope you can help as I'm a bit stuck as to where to look for a solution for this UITableView problem I'm having:</p>
  
  <p>When I insert a new item at the top of a UITableView section using the following method (see code below) it all works beautifully apart from this glitch: The inserted row at the top of the section renders as expected - with rounded corners at the top left and right. The trouble is that the rows below are not visually updated i.e the second row/cell still has it's rounded corners whereas now it should be squared on it's top corners - <a href="http://www.commonagency.net/stackoverflow/UITableView-CellCornersGlitch.jpg" rel="nofollow noreferrer">please see this screen grab for clarification</a> after the animation to insert a new row at the top of the second section has occurred. See the corners of the cells as they have not been updated.</p>
  
  <pre><code>// Amend the data source before updating the view to reflect the changes
  [[self.playerData objectAtIndex: 0] removeObjectAtIndex: row];
  [[self.playerData objectAtIndex: 1] insertObject:playerName atIndex:0];
  
  // Amend the view to reflect changes
  NSArray *deleteIndexPaths = [NSArray arrayWithObjects:
      [NSIndexPath indexPathForRow:row inSection:0],
      nil];
  
  NSArray *insertIndexPaths = [NSArray arrayWithObjects:
      [NSIndexPath indexPathForRow:0 inSection:1],
      nil];
  
  [self.playerTableView beginUpdates];
  [self.playerTableView insertRowsAtIndexPaths:insertIndexPaths withRowAnimation: UITableViewRowAnimationLeft];
  [self.playerTableView deleteRowsAtIndexPaths:deleteIndexPaths withRowAnimation: UITableViewRowAnimationLeft];
  [self.playerTableView endUpdates];
  </code></pre>
  
  <p>Of course if I just sent the message: [self.playerTableView reloadData]; the view would appear correctly. However we really need this procedure to be animated to deliver a slick experience. Maybe if there was a delegated event that was fired on the completion of the insert animation I could update the view from thbe data source to get rid of the glitches, but I havn't found any hook like this.</p>
  
  <p>Any help would be greatly appreciated.</p>