iOS Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to
刚接触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', reason: 'unable to的更多相关文章
- Terminating app due to uncaught exception 'NSUnknownKeyException' this class is not key value coding-compliant for the key
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > se ...
- *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ViewController > ...
- 在使用可变数组过程中遇到*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFDictionary setObject:forKey:]: mutating method sent to immutable object'问题
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFD ...
- Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
报错: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlace ...
- *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<_UIFeedbackParameters 0x1d4442e50> setNilValueForKey]: could not set nil as the value for the key rate.'
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<_UIFeedbac ...
- iOS程序崩溃*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [37.5 nan]'
今天上班打开昨天的程序运行,昨天跑的很溜的程序今天竟然crash了,好郁闷啊!下面附上crash的栈打印信息: 经过一番调试终于找到了原因,程序crash是因为CALayer的位置中含有不存在的数,就 ...
- Terminating app due to uncaught exception 'CALayerInvalid', reason: 'layer <CALayer: 0x7fda42c66e30> is a part of cycle in its layer tree'
iOS App里面所有的View构成一个组件树,这个树里面如果有了闭环就会出现这个报错,最常见的你不小在某UIViewController里面写了这样的代码: someView.addSubView( ...
- *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<WKWebViewConfiguration 0x1701bcd20> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the k
问题描述: ionic项目,windows下正常,打包android可正常运行: 因为需要打包到iPhone (ios 11.0.1)上测试,将代码拿到Mac OS环境下(重新npm install. ...
- Adding an Exception Breakpoint - Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 25 bey
用如下的方法可以非常方便停留到具体crash的某行代码 Adding an Exception Breakpoint Add an exception breakpoint to your proje ...
随机推荐
- Swift语言精要 - 扩展(Extension)
swift的Extension用户在不访问代码的情况下扩展基本结构类型或自定义类 extension Int { var doubled : Int { } func multiplyWith(ano ...
- 深度学习-Caffe中启用MatlabSupport编译出错的解决方案
一.如果编译前打算生成支持Matlab的库,则设置MatlabSupport为true之后. 二.记得添加Matlab的安装路径.我的是:D:\Application\DevTools\Matlab ...
- windows服务管理TopShelf
http://docs.topshelf-project.com/en/latest/index.html 我曾经把名称错为Topself
- angularjs中的坑
ng-show 等ng的指令中不需要使用{{parameter}}来取值,回无效
- MySQL auto_increment初始值设置
http://blog.csdn.net/u011439289/article/details/48055917 DROP TABLE IF EXISTS zan1; CREATE TABLE zan ...
- hdu 1016 Prime Ring Problem (dfs)
一切见凝视. #include <cstdio> #include <iostream> #include <cstring> #include <algor ...
- Android Things专题 1.前世今生
文| 谷歌开发人员技术专家, 物联网方向 (IOT GDE) 王玉成(York Wang) 2016 年 12 月,Google 公布了 Developer Preview 版的 Android Th ...
- Struts 2相关配置与基本操作演示(案例Demo)
基本介绍 Struts 2 Struts 2是Struts的下一代产品,是在 struts 1和WebWork的技术基础上进行了合并的全新的Struts 2框架.其全新的Struts 2 ...
- 〖Linux〗Shell十进制数值转换十六进制
dec2hex(){ printf } a=$(dec2hex ) echo $a
- 怎样解决WampServer #1405 - Access denied for user 'root'@'localhost' (using password: NO)
转载请注明出处:http://blog.csdn.net/xingjiarong/article/details/47903227 之前一直在用wampserver,然后环境配置也是正确的,可是过了一 ...