iOS: 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: setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key name.)