Я представляю UIAlertView пользователю и не могу понять, как написать обработчик. Это моя попытка:
let alert = UIAlertController(title: "Title",
message: "Message",
preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "Okay",
style: UIAlertActionStyle.Default,
handler: {self in println("Foo")})
У меня куча проблем с Xcode.
В документации говорится convenience init(title title: String!, style style: UIAlertActionStyle, handler handler: ((UIAlertAction!) -> Void)!)
Целые блоки / закрытия сейчас немного выше моей головы. Любое предложение очень ценится.
{alert in println("Foo")},,{_ in println("Foo")}и{println("Foo")}тоже должно работать.