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 https://github.com/facebook/react-native/pull/15033 Differential Revision: D6265930 Pulled By: shergin fbshipit-source-id: b249c4713de68fc6b3a32cee7f995dc352315970
This commit is contained in:
parent
e6f542d620
commit
75d62bf0a8
|
@ -72,7 +72,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
|
|||
// 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
|
||||
|
|
Loading…
Reference in New Issue