- (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;
}
durante l'esecuzione:personalizzato UITableViewCell NSUnknownKeyException
NSArray *nib=[[NSBundle mainBundle] loadNibNamed:@"TodoTableViewCellController" owner:self options:nil];
e non v'è un'eccezione: * terminazione app a causa di eccezione non identificata 'NSUnknownKeyException', la ragione: '[setValue: forUndefinedKey:]: questo la classe non è un codice chiave conforme alla codifica per la data chiave. '
Non so perché è successo, quindi per favore aiutatemi con questo, grazie in anticipo!
possibile duplicato di [questa classe non è la chiave di codifica del codice di conformità per la chiave] (http://stackoverflow.com/questions/3088059/this-class-is-not-key-value-coding-compliant -per-the-key) – jtbandes