diff --git a/React/Views/ScrollView/RCTScrollView.m b/React/Views/ScrollView/RCTScrollView.m index f146ba0d236..f2d4da1ecff 100644 --- a/React/Views/ScrollView/RCTScrollView.m +++ b/React/Views/ScrollView/RCTScrollView.m @@ -443,6 +443,11 @@ static inline void RCTApplyTransformationAccordingLayoutDirection(UIView *view, #if !TARGET_OS_TV if ([view isKindOfClass:[RCTRefreshControl class]]) { [_scrollView setRctRefreshControl:(RCTRefreshControl *)view]; + } + else if ([view conformsToProtocol:@protocol(UIScrollViewDelegate)]) { + [self addScrollListener:(UIView *)view]; + [_scrollView addSubview:view]; + [_scrollView sendSubviewToBack:view]; } else #endif { @@ -459,6 +464,9 @@ static inline void RCTApplyTransformationAccordingLayoutDirection(UIView *view, #if !TARGET_OS_TV if ([subview isKindOfClass:[RCTRefreshControl class]]) { [_scrollView setRctRefreshControl:nil]; + } else if ([subview conformsToProtocol:@protocol(UIScrollViewDelegate)]) { + [self removeScrollListener:(UIView *)subview]; + [subview removeFromSuperview]; } else #endif {