Skip to content

ASTableNode swipe-to-delete cell gesture can leave delete action in a partially visible state #38

Description

@rewcraig

When using UITableView's native swipe to delete table cell gesture, a partial swipe gesture either fully shows or hides the actions below the cell's content view.
uikitswipecell

The same gesture using ASTableNode/ASTableView leaves the cell's content view in a partially open state.

texturecellswipe

It appears that this functionality is implemented in UITableView's own (private)
implementation of:
-(void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset;

ASTableView overrides this method, which breaks the show/hide functionality. Removing ASTableView's implementation restores the functionality; obviously this is not the solution.

As an ugly solution I have tried creating a category on UITableView to expose the private method and calling [super scrollViewWillEndDragging] at the top of ASTableView's implementation.
This resolves the show/hide problem, but it doesn't seem ideal and I'm not sure of it's impact on other code.

Sample project:
ASTableSwipe.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions