Skip to content

Instantly share code, notes, and snippets.

@ijaureguialzo
Last active November 13, 2020 18:32
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 ijaureguialzo/2a5e453bdbd402501d57b28019f54688 to your computer and use it in GitHub Desktop.
Save ijaureguialzo/2a5e453bdbd402501d57b28019f54688 to your computer and use it in GitHub Desktop.
fileprivate func alerta(titulo: String, mensaje: String) {
// REF: How to use UIAlertController in Swift: https://medium.com/ios-os-x-development/how-to-use-uialertcontroller-in-swift-70143d7fbede
let alertController = UIAlertController(title: titulo, message: mensaje, preferredStyle: .alert)
let accion = UIAlertAction(title: "Ok", style: .default) { (action: UIAlertAction) in
// Acciones cuando se pulsa en OK
}
alertController.addAction(accion)
self.present(alertController, animated: true, completion: nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment