title: commitEditingStyle with grouped table problems
body: <p>I'm having a hard time wrapping my head around this. I'm loading up an NSMutable array from a plist file and populating a grouped table with the data. The table has 3 sections, section 0 is not editable but the other two are - I have that limitation working. My issue is when the user chooses to delete a row in the two editable sections. I believe it's because I have two keys for each entry - one for it's name and the other for it's url. </p>
  
  <p>Here's a sample of my plist. the Title key is used for the section names. Then there's a key for 'Rows' - which is the text that shows in each cell and then 'url' which, when the row is selected, loads the url in a webview. I know that I want to grab the section and the row that the user selects and then delete both the 'Row' and 'url' for that index. Any help would be greatly appreciated.</p>
  
  <p>Here's my plist:</p>
  
  <pre><code>&lt;array&gt;
  &lt;dict&gt;
  &lt;key&gt;Title&lt;/key&gt;
  &lt;string&gt;Query&lt;/string&gt;
      &lt;key&gt;Rows&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;Non-editable String 1&lt;/string&gt;
          &lt;string&gt;Non-editable String 2&lt;/string&gt;
          &lt;string&gt;Non-editable String 3&lt;/string&gt;
          &lt;string&gt;Non-editable String 4&lt;/string&gt;
      &lt;/array&gt;
  &lt;/dict&gt;
  &lt;dict&gt;
      &lt;key&gt;Title&lt;/key&gt;
      &lt;string&gt;Resources&lt;/string&gt;
      &lt;key&gt;Rows&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;Website Name 1&lt;/string&gt;
          &lt;string&gt;Website Name 2&lt;/string&gt;
          &lt;string&gt;Website Name 3&lt;/string&gt;
          &lt;string&gt;Website Name 4&lt;/string&gt;
          &lt;string&gt;Website Name 5&lt;/string&gt;
      &lt;/array&gt;
      &lt;key&gt;url&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;http://website1.com&lt;/string&gt;
          &lt;string&gt;http://website2.com&lt;/string&gt;
          &lt;string&gt;http://website3.com&lt;/string&gt;
          &lt;string&gt;http://website4.com&lt;/string&gt;
          &lt;string&gt;http://website5.com&lt;/string&gt;
      &lt;/array&gt;
  &lt;/dict&gt;
  &lt;dict&gt;
      &lt;key&gt;Title&lt;/key&gt;
      &lt;string&gt;Monitoring&lt;/string&gt;
      &lt;key&gt;Rows&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;Website Name 6&lt;/string&gt;
          &lt;string&gt;Website Name 7&lt;/string&gt;
          &lt;string&gt;Website Name 8&lt;/string&gt;
      &lt;/array&gt;
      &lt;key&gt;url&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;http://website6.com&lt;/string&gt;
          &lt;string&gt;http://website7.com&lt;/string&gt;
          &lt;string&gt;http://website8.com&lt;/string&gt;
      &lt;/array&gt;
  &lt;/dict&gt;
  </code></pre>
  
  <p></p>
  
  <p>This limits editing to the last two sections</p>
  
  <pre><code>-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView     editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
  if (indexPath.section == 0)
      return UITableViewCellEditingStyleNone;
  else
      return UITableViewCellEditingStyleDelete;
  }
  </code></pre>
  
  <p>This is (the non-working code) for committing the delete (tableData is the name of my mutable array). My app bombs at:</p>
  
  <pre><code>        [[self.tableData objectAtIndex:indexPath.section] removeObjectAtIndex:indexPath.row];
  </code></pre>
  
  <p>But guessing the deleteRowsAtIndexPaths is wrong too. 
  Code:</p>
  
  <pre><code>-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
  
  if (editingStyle == UITableViewCellEditingStyleDelete) {
  
      [self.tableView beginUpdates];
      [[self.tableData objectAtIndex:indexPath.section] removeObjectAtIndex:indexPath.row];
  
      [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath.row] withRowAnimation:UITableViewRowAnimationFade];
  
      [self.tableView endUpdates];
      [self.tableView reloadData];
  }
  </code></pre>
  
  <p><br>
  <br>
  <strong>---UPDATE---</strong>
  If I do it this way and set section and row to NSUInteger, when I log it, the correct section and row are logged. However, I'm crashing at</p>
  
  <pre><code>[[self.tableData objectAtIndex:section] removeObjectAtIndex:row];
  </code></pre>
  
  <p>In my console, I'm getting this error: <strong>Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary removeObjectAtIndex:]: unrecognized selector sent to instance 0x4b43b20'</strong></p>
  
  <pre><code>-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
  
  if (editingStyle == UITableViewCellEditingStyleDelete) {
  
      NSUInteger row = [indexPath row];
      NSLog(@"NSUInteger Row: %d", row);
  
      NSUInteger section = [indexPath section];
      NSLog(@"NSUInteger Section: %d", section);
  
      [self.tableView beginUpdates];
  
      [[self.tableData objectAtIndex:section] removeObjectAtIndex:row];
  
      [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:row inSection:section]] withRowAnimation:UITableViewRowAnimationFade];
  </code></pre>