Show Menu

Looking for an iOS Developer?

Submit your 30 day Job Listing for FREE

In Swift and iOS 8 SDK you can present an alert view as shown in the code below : var 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.