Thank you very much for spending time to answer my question, _sjc_!
I just tried the code you suggested, but it didn't save previous status of switches. Did I miss something?
.m file
Code:
-(void)applicationDidFinishLaunching:(UIApplication *)app {
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
SwitchOne.on = [defs boolForKey: @"MYSwitchOne"];
SwitchTwo.on = [defs boolForKey: @"MYSwitchTwo"];
}
-(void)applicationWillTerminate:(UIApplication *)app {
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
[defs setBool: SwitchOne.on forKey: @"MYSwitchOne"];
[defs setBool: SwitchTwo.on forKey: @"MYSwitchTwo"];
}
.h file
Code:
-(void)applicationDidFinishLaunching:(UIApplication *)app;
-(void)applicationWillTerminate:(UIApplication *)app;