I\'m presenting a UIAlertView to the user and I can\'t figure out how to write the handler. This is my attempt:
UIAlertView
let alert = UIAlertController(ti
In Swift 4 :
let alert=UIAlertController(title:"someAlert", message: "someMessage", preferredStyle:UIAlertControllerStyle.alert ) alert.addAction(UIAlertAction(title: "ok", style: UIAlertActionStyle.default, handler: { _ in print("FOO ") })) present(alert, animated: true, completion: nil)