Skip to content

解决scrollview滑动不流畅 #44

@jinjiantong

Description

@jinjiantong

RCTScrollView.m 里找到这个方法

  • (void)handleCustomPan:(__unused UIPanGestureRecognizer *)sender
    {
    //改动地方在这里
    if ([self _shouldDisableScrollInteraction] && ![NSStringFromClass([RCTUIManager JSResponder].class) isEqualToString:@"RCTScrollView"]) {
    self.panGestureRecognizer.enabled = NO;
    self.panGestureRecognizer.enabled = YES;
    // TODO: If mid bounce, animate the scroll view to a non-bounced position
    // while disabling (but only if stopScrollInteractionIfJSHasResponder was
    // called during a pan). Currently, it will just snap into place which
    // is not so bad either.
    // Another approach:
    // self.scrollEnabled = NO;
    // self.scrollEnabled = YES;
    }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions