Skip to content

Commit 636a3f5

Browse files
PanayotCankovHristo Hristov
authored andcommitted
Fix ios px not converted to dip for sizeThatFits (NativeScript#3816)
1 parent 3db17a4 commit 636a3f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tns-core-modules/ui/core/view/view.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class View extends ViewCommon {
119119
height = Number.POSITIVE_INFINITY;
120120
}
121121

122-
let nativeSize = view.sizeThatFits(CGSizeMake(width, height));
122+
let nativeSize = view.sizeThatFits(CGSizeMake(layout.toDeviceIndependentPixels(width), layout.toDeviceIndependentPixels(height)));
123123
nativeWidth = layout.toDevicePixels(nativeSize.width);
124124
nativeHeight = layout.toDevicePixels(nativeSize.height);
125125
}

0 commit comments

Comments
 (0)