From ac0572e10d742bdd8c074a3077dc83137acd8216 Mon Sep 17 00:00:00 2001 From: Binh Nguyen Date: Tue, 3 Dec 2019 19:14:34 +0900 Subject: [PATCH 1/2] fix: spinner is not shown on beginRefreshingProgrammatically --- React/Views/RefreshControl/RCTRefreshControl.m | 1 + 1 file changed, 1 insertion(+) diff --git a/React/Views/RefreshControl/RCTRefreshControl.m b/React/Views/RefreshControl/RCTRefreshControl.m index 4887a888b09c..920c26567256 100644 --- a/React/Views/RefreshControl/RCTRefreshControl.m +++ b/React/Views/RefreshControl/RCTRefreshControl.m @@ -61,6 +61,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 From 3a9496d9da7aad3024719431913dd9c4546034d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= <165856+hramos@users.noreply.github.com> Date: Tue, 3 Dec 2019 16:14:17 -0800 Subject: [PATCH 2/2] Update RCTRefreshControl.m --- React/Views/RefreshControl/RCTRefreshControl.m | 1 + 1 file changed, 1 insertion(+) diff --git a/React/Views/RefreshControl/RCTRefreshControl.m b/React/Views/RefreshControl/RCTRefreshControl.m index 920c26567256..a3ca0e1ed718 100644 --- a/React/Views/RefreshControl/RCTRefreshControl.m +++ b/React/Views/RefreshControl/RCTRefreshControl.m @@ -61,6 +61,7 @@ - (void)beginRefreshingProgrammatically _refreshingProgrammatically = YES; // When using begin refreshing we need to adjust the ScrollView content offset manually. UIScrollView *scrollView = (UIScrollView *)self.superview; + // Fix for bug #24855 [self sizeToFit]; CGPoint offset = {scrollView.contentOffset.x, scrollView.contentOffset.y - self.frame.size.height};