tabela reloadData não está funcionando
Estou usando o código a seguir para excluir uma linha da tableview e também do db, a linha é excluída da db de uma só vez, mas não é excluída da tableview até eu voltar e voltar, quero que quando excluir a tableview da linha carregar os dados ... alguma ideia?
-(void) tableView:(UITableView *)tableView
commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath
{
[self.table beginUpdates];
if (editingStyle == UITableViewCellEditingStyleDelete)
{
Hadits *delHadit = [self.allBookMarks objectAtIndex:indexPath.row];
dbAccess *dbmethods = [[dbAccess alloc] init];
NSInteger delHaditid = delHadit.haditid;
[dbmethods deleteBookMark:delHaditid];
[dbmethods release];
}
[self.table reloadData];//its not working reload data...
[table endUpdates];
}