I used the following code to save a BOOL
but it's not working.
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"save"];
StrongMAN = [[NSUserDefaults standardUserDefaults] boolForKey:@"save"];
Are there other ways to save a BOOL
?
I used the following code to save a BOOL
but it's not working.
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"save"];
StrongMAN = [[NSUserDefaults standardUserDefaults] boolForKey:@"save"];
Are there other ways to save a BOOL
?
You should add the following code
[[NSUserDefaults standardUserDefaults] synchronize];
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"kLogIn"];
[[NSUserDefaults standardUserDefaults] synchronize];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"testingBool"];
BOOL test = [[NSUserDefaults standardUserDefaults] boolForKey:@"testingBool"];