reason: '[<__NSDictionaryI setVa

2017-12-04  本文已影响0人  frola_
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

上一篇 下一篇

猜你喜欢

热点阅读