0
     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]
}

This is currently the code i am using to give me the ability to swipe left and receive a boxes "activate" and "deactivate".

Done some research and a lot of people are saying that UITableViewRowAction, does not have a method that allows you to slide right instead of left. I was wondering if anyone found some work arounds?

TomTom
  • 899
  • 8
  • 16

1 Answers1

1

Here's a set of classes in Objective C that you could use to do this:

HHPanningTableViewCell

I modified it to support left and right swiping.

Jeffrey Berthiaume
  • 4,054
  • 3
  • 35
  • 45