Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

ASCellNode with SWTableViewCell #419

Closed
asolakhyan opened this issue Apr 4, 2015 · 3 comments
Closed

ASCellNode with SWTableViewCell #419

asolakhyan opened this issue Apr 4, 2015 · 3 comments

Comments

@asolakhyan
Copy link

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.

@macistador
Copy link

Hi @asolakhyan ! Did you went further on your implemention of the swipe into ASCellNode ? How did it go ?

@reyneiro
Copy link

reyneiro commented Apr 2, 2016

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

@appleguy
Copy link
Contributor

@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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants