Last active
September 5, 2016 19:21
-
-
Save 0ber/0cd49dcfc0b5d73e84007e6290786065 to your computer and use it in GitHub Desktop.
example to create actionSheet
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
let actionSheet = UIAlertController(title: "title", message: "message", preferredStyle: .ActionSheet) | |
let action = UIAlertAction(title: "default", style: .Default, handler: {_ in print("tap")}) | |
let cancel = UIAlertAction(title: "cancel", style: .Cancel, handler: {_ in print("tap")}) | |
let destructive = UIAlertAction(title: "action", style: .Destructive, handler: {_ in print("tap")}) | |
actionSheet.addAction(action) | |
actionSheet.addAction(cancel) | |
actionSheet.addAction(destructive) | |
presentViewController(alert, animated:true, completion:nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment