I have a NSMutableDictionary, and i have added values to it (several key pair values). Now i require to save this NSMutableDictionary to a NSUserDefaults object.
1.) My code as follows; I am not sure if it is correct , and also i need to know how to retrieve the NSMutableDictionary from the NSUSerDefault ?
2.) After retrieving the NSMutableDictionary i need to save it to a NSDictionary. How could i do these ?
NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
[dic addObject:@"sss" forKey:@"hi"];
[dic addObject:@"eee" forKey:@"hr"];
[NSUserDefaults standardDefaults] setObject:dic forKey:@"DicKey"];
[[NSUserDefaults standardDefaults] synchronize];