How to Dismiss 2 Modal View Controllers in Succession?

Just found out you need to use presentingViewController in iOS 5.

[self.presentingViewController.presentingViewController dismissModalViewControllerAnimated:YES];

A -> B -> C

Running the above code in modal C will take you back to A

Leave a Comment