Permalink
Browse files

fix #10747 (ScrollView rendered incorrectly with RefreshControl)

Summary:
set the y offset to 0, since 0 offset is where we want to be after we hide the refreshControl.

Tested in emulator with ios 8, 9, 10 and also with section headers.
Closes #15033

Differential Revision: D6265930

Pulled By: shergin

fbshipit-source-id: b249c4713de68fc6b3a32cee7f995dc352315970
  • Loading branch information...
vonovak authored and facebook-github-bot committed Nov 8, 2017
1 parent e6f542d commit 75d62bf0a802b91a979d03ef497e84c3179e7767
Showing with 1 addition and 1 deletion.
  1. +1 −1 React/Views/RCTRefreshControl.m
@@ -72,7 +72,7 @@ - (void)endRefreshing
// endRefreshing otherwise the next pull to refresh will not work properly.
UIScrollView *scrollView = (UIScrollView *)self.superview;
if (scrollView.contentOffset.y < 0) {
CGPoint offset = {scrollView.contentOffset.x, -scrollView.contentInset.top};
CGPoint offset = {scrollView.contentOffset.x, 0};
[UIView animateWithDuration:0.25
delay:0
options:UIViewAnimationOptionBeginFromCurrentState

0 comments on commit 75d62bf

Please sign in to comment.