Мне было любопытно, почему я получаю ошибку SIGABRT, когда я настраиваю ячейку просмотра таблицы на контроллере.Ячейка создана в классе UITableViewCell
, все, что я вижу, связано.UITableViewController
- это не rootController, а контроллер от корня от другого UITableViewController
.поэтому RootView -> TableViewCont -> This TableViewCont.
Ошибка в функции cellForRowAtIndexPath
:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:
(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"CellTest";
CellTest *cell = (CellTest *)
[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle]
loadNibNamed:@"CellTest" owner:self
options:nil];//**error is thrown here**//
for(id currentObject in topLevelObjects){
if([currentObject isKindOfClass:[UITableViewCell class]]){
cell = (CellTest *) currentObject;
break;
}
}
}
// Configure the cell...
cell.cellTitle.text = @"Test";
cell.cellDescription.text = @"little detail";
return cell;
}
Это ошибка в журнале GDB:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<DemoViews 0x6b16ce0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key cellDescription.