Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIViewController - switch presented view controller without flash to presenting one?

Tags:

People also ask

How do I turn off presented view controller?

When it comes time to dismiss a presented view controller, the preferred approach is to let the presenting view controller dismiss it. In other words, whenever possible, the same view controller that presented the view controller should also take responsibility for dismissing it.

How do I dismiss a presented view controller in Swift?

Try to use modal. If you use push, you should dismiss it with the pop method of the navigation controller.


I have a presenting view controller that presents a modal like VC, then when the user is done with that modal, I want to transition 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 presenting base view controller shows for about a second, so it looks all flashy.

Basically I want to replace one view controller with another, not temporarily drop to the presenting view controller.

Thanks for any tips.