title: UITableView insert row at top crashes
body: <p>I'm trying to insert a row at the top of <code>UITableView</code>, but it crashes in the last line where I declare the <code>endUpdating</code>. This is the code I'm using and I'm using a button outside the table to insert row.</p>
  
  <pre><code>[comments insertObject:comment atIndex:0];
  [self.commentsTableView beginUpdates];
  NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
  [self.commentsTableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
  [self.commentsTableView endUpdates]; //here crashes with "assertion failure"
  </code></pre>
  
  <p>I know I can just do insert in array and reload, but I want to do it with animation.
  Thank you in advance.</p>
  
  <p>This is my cell for row method</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  static NSString *cellIdentifier = @"CommentCell";
  // Similar to UITableViewCell, but
  ListingCommentTableViewCell *cell = (ListingCommentTableViewCell *)[theTableView dequeueReusableCellWithIdentifier:cellIdentifier];
  if (cell == nil) {
      cell = [[ListingCommentTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
  }
  
  cell.commenterLabel.text = [[comments objectAtIndex:indexPath.row] objectForKey:@"user"];
  [cell.commenterLabel sizeToFit];
  cell.commentLabel.text = [[comments objectAtIndex:indexPath.row] objectForKey:@"text"];
  [cell.commentLabel sizeToFit];
  cell.lineView.frame = CGRectMake(5 , cell.commentLabel.frame.origin.y + cell.commentLabel.frame.size.height+ 5, cell.frame.size.width-20, 1);
  cell.dateLabel.text = [Utils formatCommentDate:[[comments objectAtIndex:indexPath.row] objectForKey:@"createdOn"]];
  return cell;
  </code></pre>
  
  <p>}</p>
  
  <p>THis is my cell height method</p>
  
  <pre><code>- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
  int height = [Utils findHeightForText:[[comments objectAtIndex:indexPath.row] objectForKey:@"teksti"] havingWidth:screenWidth - 40   andFont:[UIFont fontWithName:@"Ubuntu" size:14]];
  
  height += 25;
  
  return height + 5;
  }
  </code></pre>
  
  <p>and my number of rows method</p>
  
  <pre><code>- (NSInteger)tableView:(UITableView *)theTableView numberOfRowsInSection:(NSInteger)section
  {
  return [comments count];
  }
  </code></pre>