美文网首页
reason: '[<__NSDictionaryI setVa

reason: '[<__NSDictionaryI setVa

作者: frola_ | 来源:发表于2017-12-04 15:29 被阅读0次
reason: '[<__NSDictionaryI 0xa68ec40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key caption.'

在字典赋值的时候出现这个问题,因为setvalue:forkey是NSMutableDictionary的方法,在NSDictionary中没有这个方法,所以出现这个错误

解决办法

NSMutableDictionary *m = [[[self.form valueForKey:@"photos"] objectAtIndex:indexPath.row ] mutableCopy];

将NSDictionary转化为NSMutableDictionary

相关文章

网友评论

      本文标题:reason: '[<__NSDictionaryI setVa

      本文链接:https://www.haomeiwen.com/subject/eljxixtx.html