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:
@ -215,6 +215,8 @@ exports.start = function (entry?: NavigationEntry) {
|
|||||||
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.
|
||||||
UIApplicationMain(0, null, null, iosApp && iosApp.delegate ? NSStringFromClass(<any>iosApp.delegate) : NSStringFromClass(Responder));
|
UIApplicationMain(0, null, null, iosApp && iosApp.delegate ? NSStringFromClass(<any>iosApp.delegate) : NSStringFromClass(Responder));
|
||||||
|
@ -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