В моем коде есть окно предупреждения с двумя кнопками «ОК» и «Выход». Я хочу выйти из симулятора при нажатии «Выход».
func alertWindow() {
let alert = UIAlertController(title: "Alert", message: "Isn't type of gesture", preferredStyle: UIAlertController.Style.alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.cancel, handler: nil))
alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: { (action: UIAlertAction!) in
// Quite simulator here
}))
self.present(alert, animated: true, completion: nil)
}