func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject]? {
var activate = UITableViewRowAction(style: UITableViewRowActionStyle.Normal, title: "Activate") { (action, indexpath) -> Void in
}
activate.backgroundColor = UIColor.greenColor()
var deactivate = UITableViewRowAction(style: UITableViewRowActionStyle.Default, title: "Deactivate" , handler: { (action:UITableViewRowAction!, indexPath:NSIndexPath!) -> Void in
})
return [activate, deactivate]
}
これは現在、左にスワイプしてボックスを「アクティブ化」および「非アクティブ化」する機能を提供するために使用しているコードです。
いくつかの調査を行ったところ、多くの人が、UITableViewRowAction には左ではなく右にスライドできるメソッドがないと言っています。誰かが回避策を見つけたのではないかと思っていましたか?