swift4后原KVC方法setValuesForKeysWithDictionary:得替换为 setValuesForKeys:实现:
但是修改后编译没有问题,运行时报错:
[setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key xxx.
解决方法为将对象的属性使用@objc修饰:
swift4后原KVC方法setValuesForKeysWithDictionary:得替换为 setValuesForKeys:实现:
但是修改后编译没有问题,运行时报错:
[setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key xxx.
解决方法为将对象的属性使用@objc修饰: