From ec83e73ffad241f3e52043c4595cc80f63592bd6 Mon Sep 17 00:00:00 2001 From: Mark Simonovskiy Date: Fri, 15 Nov 2019 16:35:18 +0200 Subject: [PATCH] fix: spinner is not shown on beginRefreshingProgrammatically --- React/Views/RCTRefreshControl.m | 1 + 1 file changed, 1 insertion(+) diff --git a/React/Views/RCTRefreshControl.m b/React/Views/RCTRefreshControl.m index 661616d22454..5e23abfae84c 100644 --- a/React/Views/RCTRefreshControl.m +++ b/React/Views/RCTRefreshControl.m @@ -57,6 +57,7 @@ - (void)beginRefreshingProgrammatically _refreshingProgrammatically = YES; // When using begin refreshing we need to adjust the ScrollView content offset manually. UIScrollView *scrollView = (UIScrollView *)self.superview; + [self sizeToFit]; CGPoint offset = {scrollView.contentOffset.x, scrollView.contentOffset.y - self.frame.size.height}; // `beginRefreshing` must be called after the animation is done. This is why it is impossible