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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:20:51+00:00 2026-06-03T12:20:51+00:00

I have a HomeController that allows a user to log in and register. If

  • 0

I have a HomeController that allows a user to log in and register. If the user clicks login, I open a modal view using a segue.

Inside the modal view there is a button that says register. The desired action is to close the login modal view and then open the registration modal view using performSegueWithIdentifier:

- (void)loginControllerDidRegister:(LoginController *)controller sender:(id)sender
{
    NSLog(@"loginControllerDidRegister");
    [self dismissViewControllerAnimated:YES completion:nil];
    [self performSegueWithIdentifier:@"RegistrationSegue" sender:sender];
}

This correctly dismisses the modal view, then it calls performSegueWithIdentifier:, where I have logging code that shows it is being called just as if I had pressed the register button.

I think the animation of the login modal view disappearing may be interfering with the display of the second modal view. Any ideas on what can be done to fix 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-03T12:20:54+00:00Added an answer on June 3, 2026 at 12:20 pm

    well you need to have your “second modal” vc initiated. this is what the “prepareForSegue:” method does. also you need to override the “perform:” method. this is going to be a bit more complicated than you think. if is helps here is a breakdown of how a segue works…

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender;
    

    gets called and passes in “segue”. behind the scenes

    - (id)initWithIdentifier:(NSString *)identifier source:(UIViewController *)source destination:(UIViewController *)source;
    

    gets called, and this is where “segue” is created.

    the “segue” object has properties of

    (NSString *)identifier
    (UIViewController *)sourceViewController
    (UIViewController *)destinationViewController
    

    with out these a segue can not be performed. these are akin to manually allocating your view controller

    SomeViewController *secondView = [SomeViewController alloc] initwithNibName:@"SomeViewController" bundle:nil];
    

    then

    [[segue destinationViewController] setModalTransitionStyle:UIModalTransitionStyle(...)];
    

    which is…

    secondView.modalTransitionStyle = UIModalTransitionStyle(...);
    

    the (…) would be the “segue” transition selected in the storyboard.

    lastly

    [[segue sourceViewController] presentModalViewController:destinationViewController animated:YES];
    

    which is just

    [self presentModelViewController:secondView animated:YES];
    

    is what makes it all happen. you will basically have to tweak with those under the hood goings on to get what you want working, but it is do-able.

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

Sidebar

Related Questions

I have an MVC3 Razor view which has a link that requires user login
I have parent view that also renders sub-controller action using RenderAction() (that returns a
I have a HomeController with an Index action that shows the Index.aspx view. It
If I have a HomeController displaying its Index view, how would I proceed in
My homecontroller has a UserService object that gets wired using spring correctly (it renders
I have an application that has an public 'end user' mode and a 'back
I have this public class HomeController{ public ActionResult Index() { //do stuff return View();
I have a view with a couple of partial views that I bind to
Trying to create a page that allows users to add edit and view a
I have a view that uses a strongly typed ViewData similar to this: namespace

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.