I want to segue to my home screen after the user clicks the ":(" (button part of the UIAlert. However, when the user clicks the ":(", the view does not change. When I remove the UIAlert, and only have the segue, the method works in that it segues to the home screen. How can I do both?
let gameOver = UIAlertController(title: "BOOM", message: "You hit a mine! Game over.", preferredStyle: UIAlertControllerStyle.alert)
gameOver.addAction(UIAlertAction(title: ":(", style: UIAlertActionStyle.default, handler: nil))
self.present(gameOver, animated:true, completion: nil)
self.performSegue(withIdentifier: "homeScreen", sender:self)