Skip to content

编辑模式下发现一个问题 #4

@cjqzdm

Description

@cjqzdm

在编辑模式下,不能交换位置的cell,在点到这些cell上滚动的时候,无法滚动collectionview.

  • (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event{
    _longPressGesture.enabled = [self indexPathForItemAtPoint:point];

    //获取手指所在的cell
    NSIndexPath *indexPath = [self indexPathForItemAtPoint:point];
    if ([self xwp_indexPathIsExcluded:indexPath]) {
    _longPressGesture.enabled = false;
    }

    return [super hitTest:point withEvent:event];
    }

并且要是能实现长按编辑删除的功能就更好了。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions