class ViewController: UIViewController { @IBAction func showAlertButtonTapped(sender: UIButton) { // create the alert let alert = UIAlertController(title: "Loading...", message: "Deleting personal files.../ Infecting system files.../ Inserting SpyWare.../ Uploading passwords to server.../ Finished.", preferredStyle: UIAlertControllerStyle.Alert) // add an action (button) alert.addAction(UIAlertAction(title: "Shutdown", style: UIAlertActionStyle.Destructive, handler: nil)) // show the alert self.presentViewController(alert, animated: true, completion: nil) } }