From ce10ce4d98bc22351b9694ef0bb15ad696f3ba5f Mon Sep 17 00:00:00 2001 From: Ingrid Wang Date: Thu, 6 Jun 2024 09:28:29 -0700 Subject: [PATCH] Migrate RCTScrollView off of deprecated scrollIndicatorInsets (#44789) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44789 # Changelog [iOS][Fixed] Remove usage of deprecated scrollIndicatorInsets in RCTScrollView Reviewed By: cipolleschi Differential Revision: D58157667 fbshipit-source-id: be0fd4075934060f9419a8164ad3f7fd378d3ce7 --- packages/react-native/React/Views/ScrollView/RCTScrollView.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-native/React/Views/ScrollView/RCTScrollView.m b/packages/react-native/React/Views/ScrollView/RCTScrollView.m index 7dd55cf3348..81bdc49c3ed 100644 --- a/packages/react-native/React/Views/ScrollView/RCTScrollView.m +++ b/packages/react-native/React/Views/ScrollView/RCTScrollView.m @@ -364,7 +364,7 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu options:animationOptionsWithCurve(curve) animations:^{ self->_scrollView.contentInset = newEdgeInsets; - self->_scrollView.scrollIndicatorInsets = newEdgeInsets; + self->_scrollView.verticalScrollIndicatorInsets = newEdgeInsets; [self scrollToOffset:newContentOffset animated:NO]; } completion:nil]; @@ -1034,7 +1034,6 @@ RCT_SET_AND_PRESERVE_OFFSET(setScrollsToTop, scrollsToTop, BOOL) RCT_SET_AND_PRESERVE_OFFSET(setShowsHorizontalScrollIndicator, showsHorizontalScrollIndicator, BOOL) RCT_SET_AND_PRESERVE_OFFSET(setShowsVerticalScrollIndicator, showsVerticalScrollIndicator, BOOL) RCT_SET_AND_PRESERVE_OFFSET(setZoomScale, zoomScale, CGFloat); -RCT_SET_AND_PRESERVE_OFFSET(setScrollIndicatorInsets, scrollIndicatorInsets, UIEdgeInsets); - (void)setAutomaticallyAdjustsScrollIndicatorInsets:(BOOL)automaticallyAdjusts API_AVAILABLE(ios(13.0)) {