可能重复:
this class is not key value coding-compliant for the key
CODE
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
输出
2012-11-20 15:23:55.035 ReaderDeployment[5152:11f03] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Signature 0x7aa9de0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key drawSign.'
*** First throw call stack:
(0x1b94022 0x155dcd6 0x1b93ee1 0x3b2022 0x323f6b 0x323edb 0x33ed50 0xa4f878 0xa4f8b3 0x1b95dea 0x1aff7f1 0x88326e 0x7291fc 0x729779 0x72999b 0x7329bc 0x72d818 0x949565 0x730857 0x7309bc 0x61bb 0x1b95e99 0x66514e 0x6650e6 0x70bade 0x70bfa7 0x70b266 0x68a3c0 0x68a5e6 0x670dc4 0x664634 0x1a7eef5 0x1b68195 0x1accff2 0x1acb8da 0x1acad84 0x1acac9b 0x1a7d7d8 0x1a7d88a 0x662626 0x2bed 0x2b65)
terminate called throwing an exception
我无法理解例外和异常的原因。因此我无法根除这个问题。请帮助理解异常和解决方案。
答案 0 :(得分:1)
在界面构建器中打开xib文件。在最右边的视图打开连接面板(带箭头的磁盘)上,连接上可能会有一个名为“drawSign”的感叹号。删除或重新连接
答案 1 :(得分:0)
使用xib检查类名,这是由您的ReaderDeployment
类或xib在项目中不可用引起的,所以只需检查它并给出正确的名称..
有关详细信息,请参阅此信息,您可以从中获得建议..
答案 2 :(得分:0)
我同意joshi的观点。只需再次检查班级名称。更改为正确的类名应该可以解决问题。或者尝试重新分配课程。