title: NSInternalInconsistencyException', reason: 'Invalid update: invalid number of sections
body: <p>I'm having a problem:</p>
  
  <pre><code>- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
  float reload_distance = 15;
  if(y &gt; h + reload_distance)
  {
      if(newNumberOfItemsToDisplay &lt;= [self.arrPodsCanal count])
      {
  
          for (i=numberOfItemsToDisplay; i&lt;newNumberOfItemsToDisplay; i++)
              [indexPaths addObject:[NSIndexPath indexPathForRow:i inSection:0]];
  
          numberOfItemsToDisplay = newNumberOfItemsToDisplay;
  
          [self.myTable beginUpdates];
  
          [self.myTable insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationMiddle];
          if (numberOfItemsToDisplay == totalNumberOfItems)
                  [self.myTable deleteSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationFade];
  
          [self.myTable endUpdates];
      }
  }
  }
  </code></pre>
  
  <p>In the last block to update the UITableView I get this error:</p>
  
  <p><em>*</em> Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to delete section 1, but there are only 1 sections before the update'</p>
  
  <p>The problem is when newNumberOfItemsToDisplay == [self.arrPodsCanal count]</p>