您的位置:首页 > 其它

[2014-04-10]unable to …

2015-06-26 09:20 337 查看
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'


对于这种问题,解决方法:在

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

{

}

中加入 [self.tableView
registerClass:[UITableViewCell class]
forCellReuseIdentifier:CellIdentifier];



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

{

......

[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CellIdentifier];

......

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: