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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:09:48+00:00 2026-05-28T02:09:48+00:00

I have two pages load at beginning, login page and register page. Register page

  • 0

I have two pages load at beginning, login page and register page. Register page is behind login page.

On login page there is a button can call out demo page, so I need navigation controller for login page, so that can get “back” button when demo page call out.

So I set navigation controller in AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];


    LoginViewController *_loginViewController = [[LoginViewController alloc] init];


    RegisterViewController *_registerViewController = [[RegisterViewController alloc] init];
    [self.window addSubview:_registerViewController.view];
    [_registerViewController release];

    [self.window addSubview:_loginViewController.view];


    navController = [[UINavigationController alloc] initWithRootViewController:_loginViewController];
    [self.window addSubview:self.navController.view];
    [_loginViewController release];
    [self.window makeKeyAndVisible];
    return YES;
}

This can make button on login page works good, but when move out login page and shows register page, register page cannot response user action.

What’s wrong with the code?


EDIT:

My bad, didn’t say clearly. When I say login page “move out”, it does not really move out entirely. There is still one fifth left in screen. Then register page appears. In this case, I add both login page and register page in AppDelegate. Also, I don’t use XIB…

@dasblinkenlight and @hiren443?

  • 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-28T02:09:49+00:00Added an answer on May 28, 2026 at 2:09 am

    I think the problem is that you are adding the views of both controllers to the window, and also use the navigation controller incorrectly.

    Here is what you should do instead:

    • Create the navigation controller first
    • Push the registration page, and then the login page onto the controller
    • Hide the [back] button for the login page
    • Add navigation controller as the only subview of the main window

    In the controller of the login page, call navigation controller’s popToRootViewControllerAnimated to display the registration page.

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

Sidebar

Related Questions

I have two cascading dropdowns and one gridview control. on page load iam binding
I have two pages, on the first page after an event happens I change
I have two pages that inherit from one master page, First.aspx or second.aspx. Navigation
Currently I have two pages: The first page contains an input form, and the
I have two pages. From the first page, I open a modal with a
I have two pages one is the main page and the another one is
I have two master pages and a content page. On my local machine this
I have two pages. On one page I am adding an array to $_SESSION
I have two different index pages. I need to load one between 6:00-18:00 hrs
I have two pages. One aspx page and the other an aspx page but

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.