To save whether user prefers sounds on or off in your application you can do it as the following code block.
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"soundsOn"];
And to retrieve the sounds preferences value;
BOOL soundsOn = [[NSUserDefaults standardUserDefaults] boolForKey:@"soundsOn"];
No comments:
Post a Comment