Skip to content

Animation glitch when scrolling during content updates #34

@pronebird

Description

@pronebird

Cells animate chaotically and content offset gets misplaced If user pans the view during the call of -finishInfiniteScroll. It seems like cells are being reused during beginUpdates and endUpdates animations and due to content offset changes, apply to wrong cells. I can reproduce it with self sizing cells only.

The quick fix is to forcefully cancel pan gesture recognizer before the call to pb_setScrollViewContentInset, however it's not optimal and has side effects.

BOOL shouldCancelPanGestureRecognizer = (self.isTracking || self.isDragging);
if(shouldCancelPanGestureRecognizer) {
    BOOL wasEnabled = self.panGestureRecognizer.enabled;
    self.panGestureRecognizer.enabled = NO;
    self.panGestureRecognizer.enabled = wasEnabled;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions