Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func showAlert(){
- let alert = UIAlertController(title: "Title for the alert", message: "The message for the alert goes here", preferredStyle: .alert)
- alert.addAction(UIAlertAction(title: "Action Title Default", style: .default, handler: nil))
- alert.addAction(UIAlertAction(title: "Action Title Destructive", style: .destructive, handler: nil))
- alert.addAction(UIAlertAction(title: "Action Title Cancel", style: .cancel, handler: {_ in
- NSLog("The user has dismissed the alert")
- }))
- self.present(alert, animated: true, completion: nil)
- }
Add Comment
Please, Sign In to add comment