mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-08 09:12:05 +08:00
[ReactNative] revert "prevent ScrollView content offset from changing during layout"
This commit is contained in:
@@ -461,10 +461,7 @@ RCT_NOT_IMPLEMENTED(-initWithCoder:(NSCoder *)aDecoder)
|
||||
[super layoutSubviews];
|
||||
RCTAssert(self.subviews.count == 1, @"we should only have exactly one subview");
|
||||
RCTAssert([self.subviews lastObject] == _scrollView, @"our only subview should be a scrollview");
|
||||
|
||||
CGPoint originalOffset = _scrollView.contentOffset;
|
||||
_scrollView.frame = self.bounds;
|
||||
_scrollView.contentOffset = originalOffset;
|
||||
|
||||
[RCTView autoAdjustInsetsForView:self
|
||||
withScrollView:_scrollView
|
||||
|
||||
Reference in New Issue
Block a user