mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix ios px not converted to dip for sizeThatFits (#3816)
This commit is contained in:
committed by
Hristo Hristov
parent
3db17a4a1b
commit
636a3f5036
@@ -119,7 +119,7 @@ export class View extends ViewCommon {
|
|||||||
height = Number.POSITIVE_INFINITY;
|
height = Number.POSITIVE_INFINITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
let nativeSize = view.sizeThatFits(CGSizeMake(width, height));
|
let nativeSize = view.sizeThatFits(CGSizeMake(layout.toDeviceIndependentPixels(width), layout.toDeviceIndependentPixels(height)));
|
||||||
nativeWidth = layout.toDevicePixels(nativeSize.width);
|
nativeWidth = layout.toDevicePixels(nativeSize.width);
|
||||||
nativeHeight = layout.toDevicePixels(nativeSize.height);
|
nativeHeight = layout.toDevicePixels(nativeSize.height);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user