Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can just present the 2nd model view controller over the first using the default transition. It sounds like your second model view is being allocated and initialized in the same view controller as your first model view. If this is the case, consider refactoring your code so that you would have the first model view controller present the second modal view controller. Doing this would display one over the other like you want.</p> <p>If you need to keep the code for presentation of both modal view controllers in the same root view controller, you may want to create a delegate method. This would send a message from the first modal view controller back to the root view controller that presented it, passing along a reference to the first modal view controller. Next, use this reference to tell the first modal view controller to present the 2nd modal view controller over it.</p> <p>I'd definitely recommend the former solution though as it's logically clearer with less chance of introducing a retain cycle. </p> <p>In response to your clarification:</p> <p>To transition between two, try:</p> <p>In your <code>ModalViewControllerOne</code> instance that is already displayed from a previous session:</p> <pre><code>self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self dismissModalViewControllerAnimated:YES]; </code></pre> <p>In your rootViewController's <code>-viewDidAppear:</code></p> <pre><code>ModalViewControllerTwo *modalViewControllerTwo = [[ModalViewControllerTwo alloc] init]; modalViewControllerTwo.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [rootViewController presentModalViewController:modalViewControllerTwo animated:YES]; </code></pre> <p>The idea of this is to cross-dissolve the first modal view controller back to the root view controller, then immediately cross-dissolve the new modal view controller back onto the screen.</p> <p>If it's just the view that is different between the splash screens, you could instead of two view controllers, have one view controller with logic in that simply swaps out one view for the other depending on the URL entered and use an animation when swapping between the views.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload