2010-11-07 4 views
0

Mon UITableViewCell ne supprimera pas lorsque j'appelle la méthode. Je peux l'obtenir pour imprimer la cellule qu'il est censé supprimer, mais elle ne va pas s'enlever elle-même, et elle ne se retirera pas du tableau.Mon UITableViewCell ne va pas supprimer

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { 

    UITableViewCell *thisCell = [tableView cellForRowAtIndexPath:indexPath]; 
    [customData removeObjectIdenticalTo:thisCell.textLabel.text]; 
    NSLog(@"%@", customData); 
    [thisCell removeFromSuperview]; 
    [tabler reloadData]; 
} 

Répondre

2

vous en avez besoin: [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];

Questions connexes