Merge pull request #3785 from NativeScript/fix-ios-label

FIX: IOS measure bug + livesinc
This commit is contained in:
Alexander Vakrilov
2017-03-14 14:46:26 +02:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@ -214,6 +214,8 @@ exports.start = function (entry?: NavigationEntry) {
if (entry) {
exports.mainEntry = entry;
}
started = true;
if (!iosApp.nativeApp) {
// Normal NativeScript app will need UIApplicationMain.

View File

@ -84,7 +84,7 @@ export class Label extends TextBase implements LabelDefinition {
this._fixedSize = (widthMode === layout.EXACTLY ? FixedSize.WIDTH : 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);
if (this.textWrap) {