title: Deleting rows from UITableview throws assertion error
body: <p>I've read a bunch of SO post on this but nothing I do seems to work. I am simply trying to remove all the rows in a UITableView using the delegate method:</p>
  
  <p>deleteRowsAtIndexPaths</p>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>- (void) clearNonATITable {
  
      NSMutableArray* arrIndexPaths = [NSMutableArray array];
  
      if (self.arrNonATIResults.count &gt; 0) {
  
          [self.accountTable beginUpdates];
          for(int i=0; i&lt;self.arrNonATIResults.count; i++) {
              NSIndexPath* indexPath = [NSIndexPath indexPathForRow:i inSection:0];
              [self.accountTable deleteRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationFade];
          }
          [self.accountTable endUpdates];
  
  
          [self.accountTable reloadData];
          [self.arrNonATIResults removeAllObjects];
  
      }
  
  }
  </code></pre>
  
  <p>Here is the code I am using to populate the datasource:</p>
  
  <pre><code>- (void) updateNonATITable {
  
      [self.arrNonATIResults removeAllObjects];
  
      //setting up some test data - DELETE WHEN SERVICES ARE UP
      NSDictionary* dictRow1 = [[NSDictionary alloc] initWithObjectsAndKeys:
                                [NSNumber numberWithBool:YES], @"Is Target",
                                @"Local Pharmaceutical", @"Company Name",
                                @"71234567", @"Company ID",
                                @"123 Anystreet", @"Address",
                                @"Small Town", @"City",
                                @"Small Cell", @"Cell 5",
                                @"Booyeah!", @"Comments",
                                nil];
  
      NSDictionary* dictRow2 = [[NSDictionary alloc] initWithObjectsAndKeys:
                                [NSNumber numberWithBool:NO], @"Is Target",
                                @"Big Pharmaceutical", @"Company Name",
                                @"78903456", @"Company ID",
                                @"123 Main Street", @"Address",
                                @"Big City", @"City",
                                @"Small Cell", @"Cell 5",
                                @"Brady Rules!", @"Comments",
                                nil];
  
      self.arrNonATIResults = (NSMutableArray*)[NSArray arrayWithObjects:dictRow1, dictRow2, nil];
  
  
  
  
      //reload table
      [self.accountTable reloadData];
      [self.accountTable scrollRectToVisible:CGRectMake(0, 0, self.accountTable.frame.size.width, 38.0f) animated:YES];
  
  }
  </code></pre>
  
  <p>The assertion error is:</p>
  
  <pre><code>Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-3318.93/UITableView.m:1582
  </code></pre>