title: how delete a data in core data with tableview
body: <p>I can not find how to delete a core data entity instance from my table view.</p>
  
  <p>This is how I update the table view with information from core data:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"Cell";
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  
      Datos * record = [self.fetchedRecordsArray objectAtIndex:indexPath.row];
      cell.textLabel.text = [NSString stringWithFormat:@"%@ ",record.punto];
  
      UIImage* image = [UIImage imageWithData:record.imagen];
      cell.imageView.image = image;
  
      return cell; 
  }
  </code></pre>
  
  <p>and I am trying to use the following function to delete the entity instance, but it isn't working:</p>
  
  <pre><code>-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
  {  
      [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
  }
  </code></pre>