现在的位置: 首页 > 综合 > 正文

-[__NSCFDictionary setObject:forKey:]: mutating method sent to immutable object’ 解决方法:

2014年09月29日 综合 ⁄ 共 354字 ⁄ 字号 评论关闭

http://qqy620.diandian.com/post/2012-10-15/40039809949 

-[__NSCFDictionary setObject:forKey:]: mutating method sent to immutable object' 解决方法:

错误:NSMutableDictionary*d =[[[NSUserDefaults standardUserDefaults] objectForKey:@"xxxx"] mutableCopy];
修改:NSMutableDictionary*d =[NSMutableDictionary dictionaryWithDictionary:[[NSUserDefaults standardUserDefaults] ForKey:@"xxxx"]];

抱歉!评论已关闭.