[RootView] Fix positioning of the root view content (frame -> bounds)
Summary: The root view's content was being rendered at the wrong offset when it was not positioned at (0, 0) exactly, because the shadow view's frame was set to the root view's frame when it should have been set to the root view's bounds instead. Closes https://github.com/facebook/react-native/pull/963 Github Author: James Ide <ide@jameside.com> Test Plan: Render a root view positioned at (0, 100) and see that its content is positioned where the root view is, not at (0, 200).
This commit is contained in:
parent
27252e611c
commit
af61b13b9e
|
@ -149,7 +149,7 @@ RCT_IMPORT_METHOD(ReactIOS, unmountComponentAtNodeAndRemoveContainer)
|
|||
[super layoutSubviews];
|
||||
if (_contentView) {
|
||||
_contentView.frame = self.bounds;
|
||||
[_bridge.uiManager setFrame:self.frame forRootView:_contentView];
|
||||
[_bridge.uiManager setFrame:self.bounds forRootView:_contentView];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue