iOS: setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key name.
2016-02-24 10:04
639 查看
这里指抛出一个假设:
如果你在 storyboard中, 通过 Ctrl - Drag 方式声明了一个 @property , 但你又觉得 在 Ctrl - Drag 时 ,命名的property 不理想, 这时, 你直接在 .h 和 .m 文件中 修改了这个 实例变量的名字, 这时候,编译。 结果该会怎样呢?
不妨试试吧。
这时候,会出现以下错误, 而且还会 crash。
'NSUnknownKeyException', reason: '[<NSObject 0x8c84da0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key name.'
如果你在 storyboard中, 通过 Ctrl - Drag 方式声明了一个 @property , 但你又觉得 在 Ctrl - Drag 时 ,命名的property 不理想, 这时, 你直接在 .h 和 .m 文件中 修改了这个 实例变量的名字, 这时候,编译。 结果该会怎样呢?
不妨试试吧。
这时候,会出现以下错误, 而且还会 crash。
'NSUnknownKeyException', reason: '[<NSObject 0x8c84da0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key name.'
相关文章推荐
- iOS开发笔记10:圆点缩放动画、强制更新、远程推送加语音提醒及UIView截屏
- hibernate案例入门一query transaction criteria sessionfactory和session区别 get和load的区别 opensession 和 getcurre
- arduino mega 2560 针脚说明
- API Guides(四)——Providing Resources To Resource Types
- 第一章 遇见HADOOP 第四节 超越批处理(hadoop:the definitive guide)
- mysql primary key & unique key
- iOS UISearchBar UISearchController
- iOS应用开发中StoryBoard搭建UI界面的基本使用讲解
- BlockingQueue
- UIDynamic物理引擎
- codeforces 609F. Frogs and mosquitoes 二分+线段树
- Volley源码解析<四> RequestQueue请求队列
- UITextField 监听数值变化的三种方法
- Request.Form[""]学习过程中遇到的异常问题
- 解决:BeanNotOfRequiredTypeException办法 @Autowired和@Resource注解的不同
- Leetcode 63:Unique Paths II
- EPUBBuilder编辑器新版
- iOS开发UI篇—transframe属性(形变)
- iOS开发UI篇—UIWindow简单介绍
- Android UI框架