I have the following two procedures defined in my AppDelegate. saveSettings and loadSettings. I am calling my loadSettings procedure in the AppDidFinishLaunching method, and I a
to make it sample:
//Writing
[[NSUserDefaults standardUserDefaults] setInteger:1 forKey:@"anInt"];
[[NSUserDefaults standardUserDefaults] setDouble:1.2 forKey:@"aDouble"];
[[NSUserDefaults standardUserDefaults] setString:@"aString" forKey:@"aString"];
[[NSUserDefaults standardUserDefaults] synchronize];
//Reading:
int i = [[NSUserDefaults standardUserDefaults] integerForKey:@"anInt"]