I have a program where the user must enter a password to use it, but I do not what the user to have to enter the password every time. I believe I can do this by setting the first view controller as something if a condition is true.
Code in AppDelegate.m:
NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
if ([standardUserDefaults objectForKey:@"PassCorrect"]) {
//WHAT GOES HERE
return YES;
} else {
return YES;
}
PassCorrect holds a boolean set to TRUE if the password has been entered correctly. I need to know what to put in the if statement to set the first view controller as something different than the default.
I have looked around, but so far all things that I have come across wither throw errors or just come up with a blank screen. Anyone have something that actually WORKS.