My game looks something like this ----
Main View Controller -> Game View Controller -> Game Score View Controller
Now, After the game is over, I am performing a segue to the Game Score View Controller. But, the Game View Controller is still not dismissed, and since it detects any touch outside the Game View Controller the app crashes. I would appreciate it if anyone could please let me know how can I dismiss the Game View Controller once I perform a segue to the Game Score View Controller? Thanks a lot for the help!
func gameOver() {
stopGame()
performSegue(withIdentifier: "2to3segue", sender: self)
}