Usage `intrinsicContentSize` property of `RCTRootView` intead of deprecated `intrinsicSize`
Reviewed By: blairvanderhoof Differential Revision: D4589913 fbshipit-source-id: 6d966e9b90a0cf3e736ac20e2b6f35cbf92ff3f3
This commit is contained in:
parent
e7cc1bcbba
commit
4ba983401f
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue