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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:50:00+00:00 2026-06-04T18:50:00+00:00

I am working on an app that at launch checks for valid login credentials,

  • 0

I am working on an app that at launch checks for valid login credentials, and if they are found and not expired the main split view controller is displayed, and if not a login screen should be displayed.

Each part is working fine separately, but I am struggling with the best way at launch time to select the proper view to display.

I have tried setting up a modal segue from the root view controller, and in my application:didFinishLaunchingWithOptions: function in the App Delegate, calling this:

// Segue to the login view controller...
if (loginNeeded) {
    [self.window.rootViewController performSegueWithIdentifier:@"LoginScreen" sender:self];
}

This logically should work, but triggering segues from within the app delegate seems to be impossible.

What is the ideal place and technique for handling this?

  • 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-06-04T18:50:01+00:00Added an answer on June 4, 2026 at 6:50 pm

    You could try a custom segue, as per this post hiding-a-segue-on-login-process.

    Alternatively if you’re desperate to have the login display before the split view controller loads try something along the following lines…

    Create your login screen on the main storyboard as, say, a subclass of UIViewController. Make sure it is the initial scene (check Is Initial View Controller).

    On the storyboard, create a new segue from your login class to the original SplitViewController. Give it an identifier, ‘Load SplitViewController‘ and a segue custom class name which we’ll call FullyReplaceSegue.

    In your login class .m file, add code to be called once the user has logged in:

    [self performSegueWithIdentifier:@"Load SplitViewController" sender:self];
    

    Create the new segue class, based on UIStoryboardSegue and name it FullyReplaceSegue as per above.

    .h file

    #import <UIKit/UIKit.h>
    @interface  : UIStoryboardSegue
    
    @end
    

    .m file

    #import "FullyReplaceSegue.h"
    
    @implementation FullyReplaceSegue
    
    - (void)perform
    {
        UIViewController *dest = (UIViewController *) super.destinationViewController;
        UIWindow *window = [UIApplication sharedApplication].keyWindow;
        window.rootViewController = dest;
    
        if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
            UISplitViewController *splitViewController = (UISplitViewController *)dest;  // assumes we're transitioning to a UISplitViewController!
            UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
            splitViewController.delegate = (id)navigationController.topViewController;
        }
    }
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an app that retrieves some information from the internet on launch.
I'm working on an iPad app and reading this page that said launch images
We found that your app does not comply with the Apple iOS Human Interface
I'm about to launch a site that was working well until I found the
We're working on a Windows App that periodically has to launch operations which may
I've got a working app that saves a document into a user-specified folder in
Im working on an app that need to send a set username and password,
I am working on an app that when you go to a screen you
I am working on an App that has a page with a listview and
I am working on an app that needs plagiarism detection. I am wondering if

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.