3

Is it possible to change the UITableViewRowAction to left swipe instead of the standard right? here is my code:

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]
}
Shruti Thombre
  • 989
  • 4
  • 11
  • 27
gamerChristian
  • 471
  • 2
  • 6
  • 17

0 Answers0