You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(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;
}
}
RCTScrollView.m 里找到这个方法
{
//改动地方在这里
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
stopScrollInteractionIfJSHasResponderwas// 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;
}
}