Skip to content

Instantly share code, notes, and snippets.

@yabenatti
Created November 10, 2017 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yabenatti/2916aff24445b5d2eb6db6a561c7d79f to your computer and use it in GitHub Desktop.
Save yabenatti/2916aff24445b5d2eb6db6a561c7d79f to your computer and use it in GitHub Desktop.
UIAlertControllerSelectedAnimal
func selectedTheAnimal(animal: Animal) {
let alert = UIAlertController(title: animal.name.uppercased(), message: "Selected the: \(animal.name)", preferredStyle: .alert)
let action = UIAlertAction(title: "OK", style: .cancel, handler: nil);
alert.addAction(action)
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