码迷,mamicode.com
首页 > 其他好文 > 详细

xib自定义UIView报错误 "forUndefinedKey:]: this class is not key value coding-compliant for the key"

时间:2015-07-05 21:09:20      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:

使用xib自定义UIView的时候, 需要将控件拖拽成属性, 在viewController加载自定义view的时候报错误

 

"forUndefinedKey:]: this class is not key value coding-compliant for the key"

查找很久,终于发现是xib 的FILE‘OWNER 的类关联出错

技术分享

 

 

自定义View的时候  这个位置只能为空!!!

xib关联类应该在view的Class设置,如图

技术分享

 

修改了类的关联之后,错误解决.

 

xib自定义UIView报错误 "forUndefinedKey:]: this class is not key value coding-compliant for the key"

标签:

原文地址:http://www.cnblogs.com/bug-sniper/p/4622946.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!