In Swift and iOS 8 SDK you can present an alert view as shown in the code below : 1234var alert = UIAlertController(title: “Alert Title", message: "Message", preferredStyle: UIAlertControllerStyle.Alert) alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil)) self.presentViewController(alert, animated: true, completion: nil) You can also add destructive and cancel actions by setting the style property to Destructive and Cancel respectively.
↧