Make a selector that does the following:
- (void)showSecondModalVC { //Dismiss first one [self dismissModalViewControllerAnimated:NO]; //Immediately configure and show second one navController.modalPresentationStyle = UIModalPresentationFormSheet; navController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:navController animated:YES]; }
Then in the main part of the code:
// First one configure detailViewController.modalPresentationStyle = UIModalPresentationFullScreen; detailViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl; [self presentModalViewController:detailViewController animated:YES]; [self performSelector:@selector(showSecondModalVC) withObject:nil afterDelay:0.5f];
You will need to carefully look and see how much is needed for the first modal display, so that the animation looks good.
source share