Skip to content

Instantly share code, notes, and snippets.

@dsowsy
Last active October 28, 2015 17:25
Show Gist options
  • Select an option

  • Save dsowsy/d2103c52a974bbcb946d to your computer and use it in GitHub Desktop.

Select an option

Save dsowsy/d2103c52a974bbcb946d to your computer and use it in GitHub Desktop.
Simple alert wrapper func
func showAlert(title: String, message: String){
let alertController = UIAlertController(title: title, message:message, preferredStyle: .Alert)
let defaultAction = UIAlertAction(title: "OK", style: .Cancel, handler: nil)
alertController.addAction(defaultAction)
self.presentViewController(alertController, animated: true, completion: nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment