From 75ee84cdd24ab3b4362254c6e00ccb21c663a28f Mon Sep 17 00:00:00 2001 From: Manol Donev Date: Thu, 15 Mar 2018 18:41:02 +0200 Subject: [PATCH] fix(image): fix(image): apply tintColor correctly on iOS (#5546) only reset image to non-template when tintColor is changed to a non-color (removed) --- tns-core-modules/ui/image/image.ios.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tns-core-modules/ui/image/image.ios.ts b/tns-core-modules/ui/image/image.ios.ts index c7771a204..19839148f 100644 --- a/tns-core-modules/ui/image/image.ios.ts +++ b/tns-core-modules/ui/image/image.ios.ts @@ -25,7 +25,7 @@ export class Image extends ImageBase { if (value && this.nativeViewProtected.image && !this._templateImageWasCreated) { this.nativeViewProtected.image = this.nativeViewProtected.image.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate); this._templateImageWasCreated = true; - } else if (this.nativeViewProtected.image && this._templateImageWasCreated) { + } else if (!value && this.nativeViewProtected.image && this._templateImageWasCreated) { this._templateImageWasCreated = false; this.nativeViewProtected.image = this.nativeViewProtected.image.imageWithRenderingMode(UIImageRenderingMode.Automatic); } @@ -48,7 +48,7 @@ export class Image extends ImageBase { } public onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void { - // We don't call super because we measure native view with specific size. + // We don't call super because we measure native view with specific size. const width = layout.getMeasureSpecSize(widthMeasureSpec); const widthMode = layout.getMeasureSpecMode(widthMeasureSpec);