 - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
    //remove the deleted object from your data source.
    //If your data source is an NSMutableArray, do this
    [self.favoriteItems removeObjectAtIndex:indexPath.row];
    [[NSUserDefaults standardUserDefaults] setObject:favoriteItems forKey:@"favoritesArray"];
    [self.tableView reloadData]; // tell table to refresh now
  }
}