Guest User

Untitled

a guest
Feb 25th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. func showAlert(){
  2. let alert = UIAlertController(title: "Title for the alert", message: "The message for the alert goes here", preferredStyle: .alert)
  3. alert.addAction(UIAlertAction(title: "Action Title Default", style: .default, handler: nil))
  4. alert.addAction(UIAlertAction(title: "Action Title Destructive", style: .destructive, handler: nil))
  5. alert.addAction(UIAlertAction(title: "Action Title Cancel", style: .cancel, handler: {_ in
  6. NSLog("The user has dismissed the alert")
  7.  
  8. }))
  9. self.present(alert, animated: true, completion: nil)
  10. }
Add Comment
Please, Sign In to add comment