title: Dismiss modal view then perform segue to open a second modal view
body: <p>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.</p>
  
  <p>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 <code>performSegueWithIdentifier:</code></p>
  
  <pre><code>- (void)loginControllerDidRegister:(LoginController *)controller sender:(id)sender
  {
      NSLog(@"loginControllerDidRegister");
      [self dismissViewControllerAnimated:YES completion:nil];
      [self performSegueWithIdentifier:@"RegistrationSegue" sender:sender];
  }
  </code></pre>
  
  <p>This correctly dismisses the modal view, then it calls <code>performSegueWithIdentifier:</code>, where I have logging code that shows it is being called just as if I had pressed the register button.</p>
  
  <p>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?</p>