完成推特動作後關閉滑塊的方式是什麼?editActionsForRowAtIndexPath - 完成操作後如何關閉滑塊
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject]? {
let tweet = UITableViewRowAction(style: .Normal, title: "Tweet") { action, index in
println("tweet")
}
let done = UITableViewRowAction(style: .Default, title: "Done") { action, index in
println("done")
}
return [tweet, done]
}
我是否需要在editActionsForRowAtIndexPath中實現這個? –
是的,正如我在上面寫的,你需要在你的動作完成後做到這一點。 – ciccioska