iphone - Unable to update NSMutableDictionary initialized with the NSUserDefauts value -


i used nsuserdefaults save nsmutabledictionary. when retrieving value nsuserdefaults, unbale modify/update values of nsmutabledictionary saving values.

need suggestion on how so?

you non-mutable instances of nsdictionary nsuserdefaults. make them mutable, need this:

dict = [[nsuserdefaults standarduserdefaults] objectforkey:@"mykey"]; mymutabledict = [dict mutablecopy]; // note retain count +1, need // release or autorelease mymutabledict later on. 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -