mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-31 02:51:29 +08:00
Usage intrinsicContentSize property of RCTRootView intead of deprecated intrinsicSize
Reviewed By: blairvanderhoof Differential Revision: D4589913 fbshipit-source-id: 6d966e9b90a0cf3e736ac20e2b6f35cbf92ff3f3
This commit is contained in:
committed by
Facebook Github Bot
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user