How to change from last VC to middle VC on swifft

Hi All,

So i need to write some code to help me dismiss the segue modally once the question VC (4th) sends a segue to the results VC (5th). I want the 5th VC to dismiss the segue modally to the Difficulty VC (3th) using the code

       self.dismiss(animated: true, completion: nil)  

allows me to dismiss to the previous VC, which is the Question VC. But how can I dismiss to the dificulty VC (3rd VC).


Oscar Ramos

Here’s the code for the last VC.

I’m kinda confused on what you mean, but this may help