There seem to be 3 different ways to write the handler of a UIAlertAction. Each of the below seem to do the same/expected thing i want them to
// 1.
let okAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: {(action: UIAlertAction!) -> Void in
print("a")
})
// 2.
let okAction = UIAlertAction(title: "OK", style: .Default, handler: { (action: UIAlertAction!) in
print("b")
})
// 3.
let okAction = UIAlertAction(title: "OK", style: .Default) { (action) in
print("c")
}
// OUTPUT:
// a
// b
// c
Are these all making handlers? What are the differences and is one best to use?