Skip to content

Instantly share code, notes, and snippets.

@dariogz
Last active April 26, 2017 23:17
Show Gist options
  • Save dariogz/07d755e83aad252b6880b0873be6bdbf to your computer and use it in GitHub Desktop.
Save dariogz/07d755e83aad252b6880b0873be6bdbf to your computer and use it in GitHub Desktop.
Swift 3 Alert Modal (UIAlertController)
// Create Alert
let alert = UIAlertController(title: "Your Title", message: "Your message", preferredStyle: UIAlertControllerStyle.alert)
// Create Action
alert.addAction(UIAlertAction(title: "Your action name", style: UIAlertActionStyle.default, handler: nil))
// Present
self.present(alert, animated: true, completion: nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment