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 7509803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:01:56+00:00 2026-05-29T23:01:56+00:00

I have navigation-based application with first RootViewController. I wanna to protect it with password

  • 0

I have navigation-based application with first RootViewController.

I wanna to protect it with password like lock screen.
I’ve already code of password checking.

But I don’t know how to

1) Insert my CheckPasswordView first before RootViewController.

2) Require to enter the password every time my application reopens from suspend.

Update:

- (void)applicationDidBecomeActive:(UIApplication *)application {
    /*
     Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
     */

    CheckPasswordViewController *vc = [[CheckPasswordViewController alloc] 
                                       initWithNibName:@"CheckPasswordViewController" bundle:nil];
    vc.title = @"Enter password";       

    [self.navigationController pushViewController:vc animated:YES];    

    [vc release]; 
}
  • 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-29T23:01:58+00:00Added an answer on May 29, 2026 at 11:01 pm

    You need to use the UIApplicationDelegate’s applicationDidBecomeActive message. In that delegate (function) you can put code to make your CheckPasswordView active and ask user for password before resuming the application. From the documentation:

    This method is called to let your application know that it moved from
    the inactive to active state. This can occur because your application
    was launched by the user or the system. Applications can also return
    to the active state if the user chooses to ignore an interruption
    (such as an incoming phone call or SMS message) that sent the
    application temporarily to the inactive state.

    There are other methods in this delegate you can take a look at to implement what you need.

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

Sidebar

Related Questions

I have created one navigation based application. In that first view show me the
Currently I have a navigation based application and obviously the RootViewController is a UITableView.
I have a UITabBar in the detail view of my navigation based application. I
I have a UINavigationBar based application - only a one navigation bar that is
I'm writing a Navigation-Based iPhone app, and I'd like to have a UIToolBar docked
I have created a View based based application of 4 views. By using navigation
I have a navigation based application which also needs to have a view always
I have a navigation based application which I'm trying to add a unique UIToolbar
I have a navigation-based application with 2 UIViewControllers (controller-2 is pushed onto controller-1 when
I am developing a navigation based application and I have a custom titleView and

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.