I have three ViewControllers. I want to perform a segue from the ThirdViewController
to the SecondViewController
when you click on the Ok
Button of an alert showing up. I already tried with this code:
alert.addAction(UIAlertAction(title: "Ok!", style: UIAlertActionStyle.default, handler: { action -> Void in
self.performSegue(withIdentifier: "ThirdViewControllerSegueBack", sender: self)
}))
The problem is that a new window of the SecondViewController
shows up, so when I click back
on the navigation bar it leads me back to the ThirdViewController
. I want it to show the FirstViewController
.