I need to show an alert box when the user quits the application by clicking on the x button.How can I hook on to the exit event of the application and show an alert or view controller via a segue
performSegue(withIdentifier: "segue", sender: nil)
Please advice..