Closed pk26-lab closed 3 years ago
Hey, looking at the code, I don't know what causes the problem, probably inside the destination view controller. What ViewController the segue 2to1segue
goes to?
Regarding your question, "What ViewController the segue 2to1segue goes to?" The view controller is an empty view controller. I think it is something to do with "func touchesBegan" as after the game ends, and I perform a segue to some other view controller, it is still recognizing my tap on the screen and crashing by giving the above-mentioned error!
I have modified the code, by adding an action to perform a segue to the "Main Menu" apart from "Try again" button after the game is over. But, when the player exits the game View controller and clicks on some other view controller, the app crashes. It gives the following error:-
This is the only change that I have done:-