I upgraded to Swift 3.1, and I'm getting a few new errors that seem to be 3.1 syntax problems, as they weren't an issue before migration. Mostly they are related to closures, as in this example:
let alert = UIAlertController(title: "Success", message: "Thanks for participating in our raffle!", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: {
performSegue(withIdentifier: "to_root", sender: self)
}))
Cannot convert value of type '() -> Void' to expected argument type '((UIAlertAction) -> Void)?'
Any ideas on how I could correct this to be able to compile my code at least in the short term?
Thanks.