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

错误:

 NSMutableDictionary*muDic=

[[NSUserDefaults standardUserDefaults]objectForKey:@"userInfo"];

 

改成:

 NSMutableDictionary*muDic=[[NSMutableDictionary alloc]initWithDictionary:[[NSUserDefaults standardUserDefaults]objectForKey:@"userInfo"]];

posted on 2015-11-16 15:33  envyhappy  阅读(700)  评论(0)    收藏  举报