У меня возникают проблемы с моим tableView
падением, когда я пытаюсь удалить строку из таблицы. Метод вызывается правильно, так как изменения внесены в базу данных правильно. Ошибка, которую я получаю:
Неверное обновление: недопустимое количество строк в разделе 0.
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
NSManagedObjectContext *context = [delegate managedObjectContext];
NSManagedObject *objectToDelete = [fixedArray objectAtIndex:indexPath.row];
[context deleteObject:objectToDelete];
[delegate saveContext];
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
fixedArray = ([self mondayData]); // this is fetching the data for the array that I supply to the table view
[self.tableView numberOfRowsInSection:[fixedArray count]];
[self.tableView reloadData];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [fixedArray count];
}