-1

可能重复:
此类与键的键值编码不兼容

代码

- (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

我无法理解异常和异常的原因。因此我无法根除该问题。请帮助理解异常和解决方案。

4

3 回答 3

1

在界面生成器中打开 xib 文件。在最右边的视图打开的连接面板(带箭头的磁盘)上,连接上可能会有一个感叹号,称为“drawSign”。删除或重新连接它

于 2012-11-20T10:05:48.907 回答
0

I agree with paras joshi. Just check the class names again. Changing to the correct class names should resolve the problem. Or try reassigning the classes.

于 2012-11-20T10:28:03.200 回答
0

用 xib 检查类名,这是由于您的ReaderDeployment类或 xib 在项目中不可用,所以只需检查它并给出正确的名称..

有关更多详细信息,请参阅this 可能您可以从中获得想法..

这个类不是键值编码兼容的键

于 2012-11-20T10:09:20.067 回答