title: Add extra row to a UITableView managed by NSFetchedResultsController
body: <p>I'm using a <code>UITableViewController</code> for a table in my app, and I've added an <code>NSFetchedResultsController</code> to provide the data to show in the table (setting <code>self</code> as it's delegate).</p>
  
  <p>However I would like to add a unique cell as the last cell of the table, unrelated to the items produced by the <code>NSFetchedResultsController</code>'s predicate, I want this cell to always be at the bottom of the table.</p>
  
  <p>I've tried simply added 1 to these methods in the table view data source:</p>
  
  <pre><code>- (NSUInteger)numberOfSectionsInTableView:(UITableView *)sender
  {
      return [[self.fetchedResultsController sections] count] + 1;
  }
  - (NSUInteger)tableView:(UITableView *)sender numberOfRowsInSection:(NSUInteger)section
  {
      return [[[self.fetchedResultsController sections] objectAtIndex:section] numberOfObjects] + 1;
  }
  </code></pre>
  
  <p>And then catching the case where this extra row is being generated like so (the table only has 1 section):</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)sender
           cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      if (indexPath.row == [self.fetchedResultsController.fetchedObjects count]) {
          //Generate the last cell in  table.
      } else {
          //Generate the rest of the cells like normal.
      }
      return nil; //To keep the compiler happy.
  }
  </code></pre>
  
  <p>This checks to see if the index is the last cell and deals with it appropriately.</p>
  
  <p>However I am still getting the following error at runtime:</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSRangeException', 
  reason: '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
  </code></pre>
  
  <p>Any idea what's causing this? Or is there a better way of adding an extra row to a table view controlled by an NSFetchedResultsController?</p>