Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4021996
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:25:13+00:00 2026-05-20T10:25:13+00:00

I am lil bit new to objective C. Here is my requirement. I have

  • 0

I am lil bit new to objective C. Here is my requirement. I have a small button in my iPad App on pressing it takes me to a config screen. The requirement is I want to make this button secure. Only users with password can proceed to the config screen. If they do not enter the rite password, it should return back the main screen.

So, I though of something like, on clicking the button open a new window and provide a text field where the users enter the password and based on that move to config screen or not.

Can some help me with a proper pseudo code for me to try ?

Here is my button,

-(IBAction) goBack 
{
    [self.navigationController popViewControllerAnimated:YES]; 
}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:25:14+00:00Added an answer on May 20, 2026 at 10:25 am

    you need single check, compare use entered password with app password if both match then move forward to config screen.else error message.

    instructions(not in obj-c)

    if userEnterPassword==app.password
        push->configView
    else
       msg(error);
    

    some thing like this.

    Edit:

    You can save password in NSUserDefaults

    -(void)setPassCode
    {
    
        NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
    
        if (standardUserDefaults) 
        {
            [standardUserDefaults setObject:passCodeTextField.text forKey:@"lock"];
            [standardUserDefaults synchronize];
    
    
        } 
    }
    
    and these line for checking in a button click
    
        -(IBAction)checkPassCode
        {
        NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
            NSString *passcode== [standardUserDefaults objectForKey:@"lock"];
    
    
        if([passcode isEqualToString:lockTextField.text])
            {   
                  Second *obj=[[Second alloc] initWithNibName:@"Second" bundle:nil];
                  [self.navigationController pushViewController:obj animated:YES];
                  [obj release];
            }
        else
        {
          UIAlertView *confirmAlertView=[[UIAlertView alloc]initWithTitle:@"" message:@"Error" delegate:nil cancelButtonTitle:@"YES" otherButtonTitles:@"NO",nil];
                [confirmAlertView show];
                [confirmAlertView release];
    
        }
        }
    

    Edit:

    .h file

     UITextField *lockTextField;
    

    and make it property with IBOutlet

    @property (nonatomic,retain) IBOutlet UITextField *lockTextField;
    

    and in .m synthsize it

    @synthesize lockTextField;
    

    and make connection form IB.see the tutorial how to make connection which i suggest you.

    now you can access this textField.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<a href=#page class=lil-close>Close</a> I have this button to close a lightbox. The lightbox contains
i'm new to js. I have a lil problem,i have 2 functions , one
I am a lil new to JQ. I have a table and each row
i have a lil problem here..i'm using str_replace to replace the most common words..and
I have a lil problem with opening new tab in the browser after server
Ok so i have a lil function that will get a value from a
First off, a lil about me, i'm very new to GUI programming, especially with
i am new to ajax and read some tuts to make a lil script
I have an app which posts a message like this to a user's Facebook
So for our Final Year Project we are making a nifty lil app that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.