Usage `intrinsicContentSize` property of `RCTRootView` intead of deprecated `intrinsicSize`

Reviewed By: blairvanderhoof

Differential Revision: D4589913

fbshipit-source-id: 6d966e9b90a0cf3e736ac20e2b6f35cbf92ff3f3
This commit is contained in:
Valentin Shergin 2017-02-27 10:47:33 -08:00 committed by Facebook Github Bot
parent e7cc1bcbba
commit 4ba983401f
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ RCT_EXPORT_MODULE();
- (void)rootViewDidChangeIntrinsicSize:(RCTRootView *)rootView
{
CGRect newFrame = rootView.frame;
newFrame.size = rootView.intrinsicSize;
newFrame.size = rootView.intrinsicContentSize;
if (!_sizeUpdated) {
_sizeUpdated = TRUE;

View File

@ -203,7 +203,7 @@ Let's look at an example.
- (void)rootViewDidChangeIntrinsicSize:(RCTRootView *)rootView
{
CGRect newFrame = rootView.frame;
newFrame.size = rootView.intrinsicSize;
newFrame.size = rootView.intrinsicContentSize;
rootView.frame = newFrame;
}