3

是否可以将 UITableViewRowAction 更改为向左滑动而不是标准向右滑动?这是我的代码:

override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject]? {


    var shareAction = UITableViewRowAction(style: .Normal, title: "Share") { (action, indexPath) -> Void in
        tableView.editing = false
        println("shareAction")
    }
    shareAction.backgroundColor = UIColor.grayColor()

    var doneAction = UITableViewRowAction(style: .Default, title: "Done") { (action, indexPath) -> Void in
        tableView.editing = false
        println("readAction")
    }
    doneAction.backgroundColor = UIColor.greenColor()


    return [doneAction, shareAction]
}
4

0 回答 0