Created
October 2, 2014 15:08
-
-
Save isthisjoe/63e47c5b5ce91e9812a3 to your computer and use it in GitHub Desktop.
This file contains 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
:: UIAlertController :: | |
let alertController = UIAlertController(title: "Default Style", message: "A standard alert.", preferredStyle: .Alert) | |
let cancelAction = UIAlertAction(title: "Cancel", style: .Cancel) { (action) in | |
// ... | |
} | |
alertController.addAction(cancelAction) | |
let destroyAction = UIAlertAction(title: "Destroy", style: .Destructive) { (action) in | |
println(action) | |
} | |
alertController.addAction(destroyAction) | |
let OKAction = UIAlertAction(title: "OK", style: .Default) { (action) in | |
// ... | |
} | |
alertController.addAction(OKAction) | |
self.presentViewController(alertController, animated: true) { | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment