I need help trying to do a crude type of confirmation where you need to type: I got it! into a NSTextField then press button1 so that once they do press button1 I make my button2 enabled using
-(IBAction)check:(id)sender{
NSString *string = [NSString stringWithValue:@"I Got It!"];
if(field.stringValue isEqualToString:string){
[field setHidden:YES];
[button1 setHidden:YES];
[button2 setEnabled:YES]
}
}
This is only a one-time confirmation so I'm wondering how I can save the state of the button so that next time they launch the app they don't have to do the confirmation again. The textfield and button1 will be hidden and so that button2 will always be enabled, I want to use the NSUserDefaults because I think that would be the easiest for me to understand.