1

I have a huge tabbed bar application which uses storyboards and is already on the app store - but now I am adding in password protection to it.

I have already implemented a settings page in my app in which the user can toggle whether or not a password is required. They can also change their password here.

However, I can't find a solution to the next stage. Here is some code from my App Delegate:

-(void)requestPassword {
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    NSString *passwordON = [defaults objectForKey:@"passwordBOOL"];
    if ([passwordON isEqualToString:@"ON"]) {
        NSLog(@"ON");
    }
    else {
        NSLog(@"Off");
    }
}

As you can see, I am detecting whether or not the password is on or off. If the password is on, how do I go to a different view or set up an overlay password entry view? I am not sure if I should have a separate view for this or run some code from the first view of my app.

Any suggestions are greatly appreciated!

4

0 回答 0