title: UITableView BeginUpdates
body: <p>I'm having some issues with my beginupdates and endupdates from my UITableView. I want to use this functions to animate my tableview instead of using reloadData that i was using till now. It always give a problem when i do it with BeginUpdates and complains about this:</p>
  
  <pre><code>'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 1.  The number of rows contained in an existing section after the update (3) must be equal to the number of rows contained in that section before the update (2), plus or minus the number of rows inserted or deleted from that section (0 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'
  </code></pre>
  
  <p>So there is a problem with my numberOfRowInSection:</p>
  
  <pre><code>- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
      int returnInt;
  
      if (section == 0) {
          if ([self datePickerIsShown]){
              returnInt = 3;
          }else{
              returnInt = 2;
          }
      }else if([[[[self theNewGame] _dobbelstenen] objectAtIndex:section - 1] diceSoort] == ENUMOgen){
          returnInt = 1;
      }else{
          returnInt = [[[[[self theNewGame] _dobbelstenen] objectAtIndex:section - 1.0] optiesDobbelsteen] count] + 1.0;
      }
  
      return returnInt;
  }
  </code></pre>
  
  <p>And i'm calling it on this way:</p>
  
  <pre><code>if (indexPath.section == 0 &amp;&amp; indexPath.row == 1) {
          self.datePickerIsShown = ! self.datePickerIsShown;
          [tableView beginUpdates];
          [tableView endUpdates];
      }
  </code></pre>
  
  <p>What's the problem?</p>
  
  <p>Kind regards</p>