使用coreData(Person setValuesForKeysWithDictionary:)时, 出现问题
程序crash的问题如下:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unacceptable type of value for attribute: property = "myKey"; desired type = NSString; given type = __NSArrayM
原因是: 通过coreData创建的model不能接受数组类型的数据但是用字符串接收又不对(数据库不能插入数组), 所以程序会crash;
简单写一下解决办法:
1.选中你的coreData, 点击进入