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.
Need an iOS Developer?
Submit your 30 day Job Listing for FREE
Many times, we want to give a visual indication to the user that something has happened. We might tell the user that a file was saved, information has loaded, or some condition has been met that they should be informed of. We might elect to do this with a UILabel, but for a truly attention-getting
- March 13, 2013