I'm making a game like logo quiz;
Would using the below code be appropriate for saving and loading data:
This code would only allow the user to play that specific logo once and once only!
of course I'd wire up each and every outlet that has an action!
Is this the right way or should I try something else?
[super viewDidLoad];
{ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *loadstring = [defaults objectForKey:@"savedstring"];
[_textbox setText:loadstring];
}
- (IBAction)btncheck:(id)sender {
NSString *savestring = _textbox.text;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:savestring forKey:@"savedstring"];
[defaults synchronize];
}