Skip to content

Commit 75ee84c

Browse files
authored
fix(image): fix(image): apply tintColor correctly on iOS (NativeScript#5546)
only reset image to non-template when tintColor is changed to a non-color (removed)
1 parent 310edf7 commit 75ee84c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class Image extends ImageBase {
2525
if (value && this.nativeViewProtected.image && !this._templateImageWasCreated) {
2626
this.nativeViewProtected.image = this.nativeViewProtected.image.imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate);
2727
this._templateImageWasCreated = true;
28-
} else if (this.nativeViewProtected.image && this._templateImageWasCreated) {
28+
} else if (!value && this.nativeViewProtected.image && this._templateImageWasCreated) {
2929
this._templateImageWasCreated = false;
3030
this.nativeViewProtected.image = this.nativeViewProtected.image.imageWithRenderingMode(UIImageRenderingMode.Automatic);
3131
}
@@ -48,7 +48,7 @@ export class Image extends ImageBase {
4848
}
4949

5050
public onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void {
51-
// We don't call super because we measure native view with specific size.
51+
// We don't call super because we measure native view with specific size.
5252
const width = layout.getMeasureSpecSize(widthMeasureSpec);
5353
const widthMode = layout.getMeasureSpecMode(widthMeasureSpec);
5454

0 commit comments

Comments
 (0)