Skip to content

Commit

Permalink
fix #10747 (ScrollView rendered incorrectly with RefreshControl)
Browse files Browse the repository at this point in the history
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 75d62bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Views/RCTRefreshControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 75d62bf

Please sign in to comment.