mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
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)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user