Kein Indexpfad für die Tabellenzelle wird wiederverwendet

Dieser begann zu geschehen, aus heiterem Himmel. Irgendwelche Ideen: Code:

CUSTOM (ich habe ersetzt die tatsächliche Klasse name enthält den Namen des Clients).

Initialisierung meinem tableView:

[self.tableView registerClass:[CUSTOMCLASSNAME class] forCellReuseIdentifier:[self reuseIdentifier]];

In der Zelle für Zeile:

Hallo, der Titel ist gedruckt in der Konsole. Dies ist mein cellForRow:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    AVTCheckListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self reuseIdentifier] forIndexPath:indexPath];

    [self configureCell:cell atIndexPath:indexPath];

    return cell;
}

- (void)configureCell:(AVTCheckListTableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath {
    ChecklistGroup *group = [self.checklistFetchedResultsController.fetchedObjects objectAtIndex:indexPath.section];

    ChecklistItem *item = [self getChecklistItemForIndexPath:indexPath];

    [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    [[cell cellTextView] setAttributedText:[[item checked] boolValue] ? [[NSAttributedString alloc] initWithString:[item name] attributes:@{ NSStrikethroughStyleAttributeName : @(NSUnderlineStyleSingle) } ] : [[NSAttributedString alloc] initWithString:[item name]]];
    [[cell cellTextView] setUserInteractionEnabled:[[group isUserDefined] boolValue]];
    [[cell cellTextView] setTag:indexPath.row];
    [[cell cellTextView] setDelegate:self];
    [[cell tickImage] setHidden:![[item checked] boolValue]];
}

//Method that returns re-use:

- (NSString *) reuseIdentifier {
    return @"CheckListTableView";
}

InformationsquelleAutor der Frage CW0007007 | 2013-08-28

Schreibe einen Kommentar