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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:15:38+00:00 2026-05-22T01:15:38+00:00

Im my application I have the following code, the first bit runs when my

  • 0

Im my application I have the following code, the first bit runs when my application launches, and it presents a login screen in a modal view. With my rootController added to the window before that.

The Modal view will allow a user to log on, view terms and conditions and then if they accept the loadMainApp function is called.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    rootController.delegate = self;
    [window addSubview:rootController.view];

    LoginViewController *_loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginView" bundle:[NSBundle mainBundle]];
    self.loginViewController = _loginViewController;
    [_loginViewController release];


    UINavigationController *navi = [[[UINavigationController alloc]initWithRootViewController:loginViewController]autorelease];

    navi.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    [loginViewController release];
    [rootController presentModalViewController:navi animated:YES];

    [self.window makeKeyAndVisible];
    return YES;
}

This next bit is called when the user accepts terms and conditions:

-(void)loadMainApp:(UIView *)fromView{

    [fromView removeFromSuperview];
    [window addSubview:rootController.view];
    rootController.selectedIndex = 2;
    rootController.delegate = self;

}

From here I want to be able to use the people picker which is a modal view and I attempt it with this code:

 ABPeoplePickerNavigationController *picker =
        [[ABPeoplePickerNavigationController alloc]init];
        picker.peoplePickerDelegate = self;

        [rootController presentModalViewController:picker animated:YES];
        [picker release];

But nothing happens, when I try to present a modal view from my rootController nothing displays.

This appears to occur after this code in applicationDidFinishLaunching is run:

LoginViewController *_loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginView" bundle:[NSBundle mainBundle]];
        self.loginViewController = _loginViewController;
        [_loginViewController release];


        UINavigationController *navi = [[[UINavigationController alloc]initWithRootViewController:loginViewController]autorelease];

        navi.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
        [loginViewController release];
        [rootController presentModalViewController:navi animated:YES];

        [self.window makeKeyAndVisible];
        return YES;

If I dont display the login screen at all and instead just add my rootController

rootController.delegate = self;
        [window addSubview:rootController.view];

in the applicationDidFinishLaunching function then everything works fine when I go to display the people picker.

Is there something fundamental that I am breaking here or can anyone spot what I may be doing wrong?

  • 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-22T01:15:39+00:00Added an answer on May 22, 2026 at 1:15 am

    Are you dismissing the first modal view controller correctly, via thedismissModalViewControllerAnimated: method? If you’re just removing the modal view controller’s view from its superview, then probably a lot of paperwork is being left undone by UIKit.

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

Sidebar

Related Questions

I have a C# application that includes the following code: string file = relativePath.txt;
I have a simple application with the following code: FileInfo[] files = (new DirectoryInfo(initialDirectory)).GetFiles();
I have an application web.xml with the following entry: <error-page> <error-code>404</error-code> <location>/system_files/error/p_notfound.jsp</location> </error-page> However,
I have following code, which executes on button press. At first it works as
I have the following code: @Name(myService) @Scope(ScopeType.APPLICATION) @Stateless public class MyService { private Service
Let's say that I have the following code in application_helper.rb : def do_something if
We have a Hibernate/Spring application that have the following Spring beans: <bean id=transactionManager class=org.springframework.orm.hibernate3.HibernateTransactionManager
I have the following application which replicates an issue I'm having in a larger
I have an application that is made up of the following: A central database
I'm converting an application to use Java 1.5 and have found the following method:

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.