- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *TodoListTableIdentifier = @"TodoListTableIdentifier";
TodoTableViewCellController *cell = (TodoTableViewCellController *)[tableView dequeueReusableCellWithIdentifier:TodoListTableIdentifier];
if (cell == nil)
{
NSArray *nib=[[NSBundle mainBundle] loadNibNamed:@"TodoTableViewCellController" owner:self options:nil];
cell=[nib objectAtIndex:0];
[cell setSelectionStyle:UITableViewCellSelectionStyleGray];
}
Todo *todo = [self.allTodoArray objectAtIndex:[indexPath row]];
cell.titleLabel.text = todo.fileTitle;
cell.money.text = [NSString stringWithFormat:@"Monei:%f",todo.amount];
cell.name.text = todo.realName;
cell.date.text = todo.operateTime;
return cell;
}
podczas pracy:klienta UITableViewCell NSUnknownKeyException
NSArray *nib=[[NSBundle mainBundle] loadNibNamed:@"TodoTableViewCellController" owner:self options:nil];
i jest wyjątek: * zakończenie aplikacji ze względu nieprzechwyconego wyjątku 'NSUnknownKeyException', dlatego „[setValue: forUndefinedKey:]: jest klasa nie jest zgodna z kluczową wartością kluczową dla daty klucza. "
Nie wiem, dlaczego tak się dzieje, więc proszę, pomóżcie mi z tym, z góry dziękuję!
możliwe duplikat [tej klasie nie jest wartość klucza kodowania zgodny klucza] (http://stackoverflow.com/questions/3088059/this-class-is-not-key-value-coding-compliant -for-key) – jtbandes