mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +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;
|
||||
}
|
||||
|
||||
let nativeSize = view.sizeThatFits(CGSizeMake(width, height));
|
||||
let nativeSize = view.sizeThatFits(CGSizeMake(layout.toDeviceIndependentPixels(width), layout.toDeviceIndependentPixels(height)));
|
||||
nativeWidth = layout.toDevicePixels(nativeSize.width);
|
||||
nativeHeight = layout.toDevicePixels(nativeSize.height);
|
||||
}
|
||||
|
Reference in New Issue
Block a user