Мой UITableViewCell не будет удален - PullRequest
0 голосов
/ 07 ноября 2010

Мой UITableViewCell не удаляется при вызове метода.Я могу заставить его распечатать ячейку, которую предполагается удалить, но она не удалит себя и не удалит себя из массива.

- (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];
}

1 Ответ

2 голосов
/ 07 ноября 2010

вам нужно это: [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...