最近在学ios开发,使用bundle 加载xib时第一次没问题,第二次就奔溃了,搞了一早上不知道哪里出问题了
奔溃的代码段为:
UIView *view = [[[NSBundle mainBundle] loadNibNamed:@"AppInfoView" owner:nil options:nil] lastObject];
错误:
setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key appIconImageView.
百度了一下,原来是xib中的outlet链接到了一个文件中
好了,问题找到了,把所有outlet删掉就行,至于为什么,我也不知道
原文:http://www.cnblogs.com/panxiaochun/p/5023174.html