Skip to content

解决scrollview滑动不流畅 #44

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions