iOS Terminating app due to uncaught exception 'NSInternalInconsistencyException', re
Posted yutingliuyl
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了iOS Terminating app due to uncaught exception 'NSInternalInconsistencyException', re相关的知识,希望对你有一定的参考价值。
刚接触ios,依照教程操作执行出现错误
Terminating app due to uncaught exception ‘NSInternalInconsistencyException‘, reason: ‘unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard
解决的方法是加一句:
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CellIdentifier];
加的位置是:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"ListPrototypeCell";
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CellIdentifier];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
// config cell
XYZToDoItem * toDoItem = [self.toDoItem objectAtIndex:indexPath.row];
cell.textLabel.text = toDoItem.itemName;
return cell;
}
因为刚学习IOS,原因不明
以上是关于iOS Terminating app due to uncaught exception 'NSInternalInconsistencyException', re的主要内容,如果未能解决你的问题,请参考以下文章
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewCon
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: xxxx
Terminating app due to uncaught exception 'NSUnknownKeyException' this class is not key valu
成功编译无错MAC OpenJDK8:Terminating app due to uncaught exception ‘NSInternalInconsistencyException‘
PMON (ospid: 2853): terminating the instance due to error 471
postgreSql 报错 (psycopg2.errors.IdleInTransactionSessionTimeout) terminating connection due to idle-i