mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Merge pull request #3785 from NativeScript/fix-ios-label
FIX: IOS measure bug + livesinc
This commit is contained in:
@ -214,6 +214,8 @@ exports.start = function (entry?: NavigationEntry) {
|
|||||||
if (entry) {
|
if (entry) {
|
||||||
exports.mainEntry = entry;
|
exports.mainEntry = entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
started = true;
|
||||||
|
|
||||||
if (!iosApp.nativeApp) {
|
if (!iosApp.nativeApp) {
|
||||||
// Normal NativeScript app will need UIApplicationMain.
|
// Normal NativeScript app will need UIApplicationMain.
|
||||||
|
@ -84,7 +84,7 @@ export class Label extends TextBase implements LabelDefinition {
|
|||||||
this._fixedSize = (widthMode === layout.EXACTLY ? FixedSize.WIDTH : FixedSize.NONE)
|
this._fixedSize = (widthMode === layout.EXACTLY ? FixedSize.WIDTH : FixedSize.NONE)
|
||||||
| (heightMode === layout.EXACTLY ? FixedSize.HEIGHT : FixedSize.NONE);
|
| (heightMode === layout.EXACTLY ? FixedSize.HEIGHT : FixedSize.NONE);
|
||||||
|
|
||||||
let nativeSize = nativeView.sizeThatFits(CGSizeMake(width, height));
|
let nativeSize = nativeView.sizeThatFits(CGSizeMake(layout.toDeviceIndependentPixels(width), layout.toDeviceIndependentPixels(height)));
|
||||||
let labelWidth = layout.toDevicePixels(nativeSize.width);
|
let labelWidth = layout.toDevicePixels(nativeSize.width);
|
||||||
|
|
||||||
if (this.textWrap) {
|
if (this.textWrap) {
|
||||||
|
Reference in New Issue
Block a user