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:
Valentin Shergin authored and Facebook Github Bot committed 2019-06-17 19:18:57 -07:00
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];