[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];
......
}
'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];
......
}
相关文章推荐
- [2014-04-16]Pod::Executable&nbsp…
- [2014-04-20]ios获取数据中去掉htm…
- [2014-04-21]解决uitableviewcell…
- iOS 开发者必知的 75&nb…
- ios支付宝Demo报错(Linker co…
- [2014-06-01][转]apps须遵循iOS数…
- [2014-09-25]对于Xcode6里面反射(p…
- [2014-10-09]Xcode6更新之后的一些…
- [2014-10-20]XCode6编译问题:fata…
- XCode报错 has been&nbs…
- [转]UISearchbar去除背景色的方法…
- [2014-10-18]iOS8开发错误整理(持…
- 程序员应该关注的一些事儿
- [2014-11-25]友盟分享错误汇总
- [2014-11-25]友盟分享错误汇总
- [2014-12-03]XCode6提交appstore错…
- [2014-12-03]XCode6提交appstore错…
- [2015-03-08]IOS App Ic…
- [2015-03-16]改变UITableView的hea…
- [2015-03-16]解决UITableViewStyle…