Skip to content

Instantly share code, notes, and snippets.

@bigimot22
Last active March 3, 2019 09:18
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 bigimot22/b13561498911124ce65f8aa9de4d9047 to your computer and use it in GitHub Desktop.
Save bigimot22/b13561498911124ce65f8aa9de4d9047 to your computer and use it in GitHub Desktop.
Un ejemplo de una simple alerta con dos botones en Swift
func showMyAlert() {
//1
let alerta = UIAlertController(title: "Mi título", message: "Mi mensaje para el usuario.", preferredStyle: .alert)
//2
alerta.addAction(UIAlertAction(title: "Aceptar", style: .default, handler: nil))
//3
self.present(alerta, animated: true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment