this class is not key value coding-compliant for the key '***'的解决方案
来源:互联网 发布:马丁全单吉他知乎 编辑:程序博客网 时间:2024/05/13 08:15
项目中经常会遇到this class is not key value coding-compliant for the key '***.'这样的崩溃,原因经过分析可能是由以下几点造成的:
1,在加载界面的时候,总是报这个错误:
解决方法:
因为在xib的连接中,有一个变量是已经删除了的。虽然代码已经删除了,但是连线还是存在于xib文件中。
删掉这个多余的连接线就好了。
2,检查代码拼写,有时候改了类的名字,但是有些地方没有改过来,就会一直报这种错误,比如
NSArray *secondLevelObjects = [[NSBundlemainBundle] loadNibNamed:@"XOpenPositionContentCell"owner:niloptions:nil];
重点是字串中的类名,一般使用类名定义的时候很好找出来改掉,但是写在字串里面的不容易被发现
3,我今天遇到的就是这一条,真的不好找,就是在连线的时候选择的是cell 不是file‘s owner,有时候设置了xib文件的class,但是项目未更新过来,重启xcode
4,连线的时候选择的是cell 不是file‘s owner,有时候设置了xib文件的class,但是项目未更新过来,重启xcode
1,加载自定义的tableViewCell的时候总是死在:
XInstrumentOpenCell *cell = [tableViewdequeueReusableCellWithIdentifier:CellTableIdentifier];
解决方法:
因为xib的属性检查器中,没有设置Identifier为cellID
static NSString *CellTableIdentifier = @"cellID";
好了,暂时就归结到这几点,如果还有其他的原因,也欢迎前来指正添加- this class is not key value coding-compliant for the key '***'的解决方案
- iOS 错误"This class is not key value coding-compliant for the key"解决方案
- "this class is not key value coding-compliant for the key ..."问题的解决(转)
- Xcode运行后报错: this class is not key value coding-compliant for the key的原因
- this class is not key value coding-compliant for the key imageView的崩溃问题
- "this class is not key value coding-compliant for the key ..."问题的解决
- this class is not key value coding-compliant for the key XXX错误的解决方法
- this class is not key value coding-compliant for the key XXX错误的解决方法
- iOS "this class is not key value coding-compliant for the key ..."问题的解决
- "this class is not key value coding-compliant for the key ..."问题的解决
- 关于Xcode"this class is not key value coding-compliant for the key" 的错误问题
- this class is not key value coding-compliant for the key
- this class is not key value coding-compliant for the key
- 关于 Xcode:this class is not key value coding-compliant for the key
- this class is not key value coding-compliant for the key XXXX
- 报错:this class is not key value coding-compliant for the key closeLotTextField解决方法
- setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key
- setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key
- 微信 php form post 为空
- Vitamio 导入依赖库出错 :Error:(9, 0) Could not get unknown property 'ANDROID_BUILD_SDK_VERSION' for project
- [bzoj4861]魔法咒语
- 全面的前端开发面试题
- Golang 学习之路二:工作区,源码文件,源码包,初始化函数
- this class is not key value coding-compliant for the key '***'的解决方案
- __dirname cwd() 的区别
- 红帽系统管理学习II 03系统延迟及定时机制
- 使用Nexus搭建Maven私服
- ES6核心知识
- 二叉树的层次遍历
- OpenWRT菜单功能配置
- ipv4头部可选项和ipv6头部的区别
- 把排序数组转换为高度最小的二叉搜索树