Полностью удалите следующее:
sect = [listArray objectAtIndex:indexPath.row];
[sect removeObjectAtIndex:indexPath.row];
и
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
Просто позвоните [listArray removeObjectAtIndex:indexPath.row];
, а затем позвоните reloadData
, чтобы обновить UITableView
.