Last active
November 27, 2016 19:04
-
-
Save pietrorea/8c0763ea1f7a3caf2393 to your computer and use it in GitHub Desktop.
UIAlertController example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var alert = UIAlertController(title: "Title", message: "Alert view message", preferredStyle: UIAlertControllerStyle.Alert) | |
alert.addAction(UIAlertAction(title: "Save", style: .Default, handler: { (action: UIAlertAction!) in | |
println("Saved") | |
})) | |
alert.addAction(UIAlertAction(title: "Cancel", style: .Default, handler: { (action: UIAlertAction!) in | |
println("Cancel") | |
})) | |
presentViewController(alert, animated: true, completion: nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good one, see more alertview using UIAlertController in Swift : http://iosdevcenters.blogspot.com/2016/03/uialertcontroller-in-swift.html