Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bananafish911/10b7dcc739ac862657dcd6824f29cc6d to your computer and use it in GitHub Desktop.
Save bananafish911/10b7dcc739ac862657dcd6824f29cc6d to your computer and use it in GitHub Desktop.
extension UIViewController {
func showAlert(message: String) {
let alert = UIAlertController(title: "Message", message:message, preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler:{ (ACTION :UIAlertAction!)in
debugPrint("User click Ok button")
}))
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