I need to dismiss the two modal view controllers, I know how to pop two or more view controllers
UINavigationController* navController = self.navigat
From the docs for -[UIViewController dismissModalViewController]
:
If you present several modal view controllers in succession, and thus build a stack of modal view controllers, calling this method on a view controller lower in the stack dismisses its immediate child view controller and all view controllers above that child on the stack. When this happens, only the top-most view is dismissed in an animated fashion; any intermediate view controllers are simply removed from the stack. The top-most view is dismissed using its modal transition style, which may differ from the styles used by other view controllers lower in the stack.