Как я могу запустить действие для кнопки «держать», не отпуская UIAlertController? Я нашел решения для отключения кнопки, но это не то, что мне нужно.Как отключить увольнение UIAlertController в swift
newItemPrompt = UIAlertController(title: "title", message: "message", preferredStyle: UIAlertControllerStyle.Alert)
let cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Default, handler: nil)
let okAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: { (action) -> Void in
println("ok")
})
let keepAlert = UIAlertAction(title: "keep", style: .Default) { (action) -> Void in
println("keep alert view")
}
newItemPrompt.addAction(okAction)
newItemPrompt.addAction(keepAlert)
newItemPrompt.addAction(cancelAction)
self.presentViewController(newItemPrompt, animated: true, completion: nil)