Skip to content

Instantly share code, notes, and snippets.

@RealEmmettS
Last active January 7, 2022 16:05
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 RealEmmettS/fc335fd4cac9d7f98d0a7301951ed9f7 to your computer and use it in GitHub Desktop.
Save RealEmmettS/fc335fd4cac9d7f98d0a7301951ed9f7 to your computer and use it in GitHub Desktop.
func showAlert(title: String, message: String, continueTitle: String, cancelTitle: String, addCancelButton cancel: Bool){
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: nil))
if cancel {
alert.addAction(UIAlertAction(title: "No", style: .cancel, handler: nil))
}
self.present(alert, animated: true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment