mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Fixed ScrollView layout issue
Summary: We should not use `self.contentView` accessor to insert container views (views that might be used as a container for nested views) into component view otherwise it causes double applying of padding values. Reviewed By: mdvacca Differential Revision: D15862075 fbshipit-source-id: aad834aeca06f66b19c2f7bbaa0b58f937e66994
This commit is contained in:
1 parent
c19c6cef3f
commit
fbbfeb6426
1 file changed
+2
-1
@@ -46,8 +46,9 @@ using namespace facebook::react;
|
||||
_props = defaultProps;
|
||||
|
||||
_scrollView = [[RCTEnhancedScrollView alloc] initWithFrame:self.bounds];
|
||||
_scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
_scrollView.delaysContentTouches = NO;
|
||||
self.contentView = _scrollView;
|
||||
[self addSubview:_scrollView];
|
||||
|
||||
_containerView = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
[_scrollView addSubview:_containerView];
|
||||
|
||||
Reference in new issue
Block a user