[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:
James Ide 2015-04-22 16:12:46 -07:00
parent 27252e611c
commit af61b13b9e
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ RCT_IMPORT_METHOD(ReactIOS, unmountComponentAtNodeAndRemoveContainer)
[super layoutSubviews]; [super layoutSubviews];
if (_contentView) { if (_contentView) {
_contentView.frame = self.bounds; _contentView.frame = self.bounds;
[_bridge.uiManager setFrame:self.frame forRootView:_contentView]; [_bridge.uiManager setFrame:self.bounds forRootView:_contentView];
} }
} }