ASCellNode with SWTableViewCell
Hi,
I was wondering if ASCellNode support iOS 7/8 style pan gestures (i.e. swipeable content view), sort of what SWTableViewCell does to UITableViewCell.
Thank you.
Hi @asolakhyan ! Did you went further on your implemention of the swipe into ASCellNode ? How did it go ?
I'm working on a case similar to this. Targeting iOS 8 or above you can use this:
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
let editAction = UITableViewRowAction(style: UITableViewRowActionStyle.Normal, title: "Mute 2h") { (rowAction, indexPath) in
}
editAction.backgroundColor = UIColor.railroadSecondaryColor()
let deleteAction = UITableViewRowAction(style: .Default, title: "Leave") { (rowAction:UITableViewRowAction, indexPath:NSIndexPath) -> Void in
//TODO: Delete the row at indexPath here
}
deleteAction.backgroundColor = UIColor.railroadActiveColor()
return [deleteAction, editAction]
}
@asolakhyan: Thanks for contributing to the AsyncDisplayKit community by asking your question here! I apologize that it has taken me so long to get to this question. Unfortunately, at this time we do not have any plans to support this.
However, feel free to follow up with @reyneiro or @alexrmacleod (who If I'm remembering correctly implemented a sweet example using MGSwipeTableCell - see conversation in #1586).