UIViewController - a switch introduced a view controller without a flash to present it?

I have an upcoming view controller that is modal, such as VC, then when the user is done with that modal, I want to switch to another modal, but calling:

// we are done. [self.presentingViewController dismissViewControllerAnimated:NO completion:nil]; if (self.showOtherContoller) { UIViewController* aVC = [[UIViewController alloc] initWithNibName:@"someNib" bundle:nil]; [self.presentingViewController aVC animated:NO completion:nil]; } 

works, but the representing base view controller shows about a second, so it looks amazing.

Basically, I want to replace one view controller with another, and not temporarily draw a view controller in the view.

Thanks for any advice.

+6
source share
1 answer

Your modal transition style is CoverVertical. The first modal slide goes down when it is rejected by exposing it to presentingViewController, then the second modal slide goes up, hiding the presentingViewController.

You want to change the transition so that the first modal is replaced by the second modal.

Change both modal transition styles of controllers to CrossDissolve before releasing the first and introducing the second. Before rejecting the second, change it to CoverVertical so that it slides down to match the first modal shift up.

+2
source

All Articles