I'm working on a todo list app, and now I can use these code to achieve swipe left to delete
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
let delete = UITableViewRowAction(style: .Normal, title: "Delete") { action, index in
print("Delete button tapped")
}
delete.backgroundColor = UIColor.redColor()
return [delete]
}
And I think I searched the WHOLE internet but none of those solutions can do the swipe right job and work fine on me at the same time. I'm using swift 2.0, Xcode 7 beta 5.
Anyone done this before?