Skip to content

Commit

Permalink
fix(ios): fix color change with HTML / formattedString
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Feb 9, 2022
1 parent 7af7ba4 commit 4de4d80
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/label.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export class Label extends LabelBase {
fontSize,
familyName,
fontWeight,
color: this.color,
// color: this.color,
letterSpacing: this.letterSpacing,
lineHeight: this.lineHeight,
textAlignment: this.nativeTextViewProtected.textAlignment
Expand Down Expand Up @@ -440,11 +440,11 @@ export class Label extends LabelBase {
this.nativeTextViewProtected.setTitleColorForState(color, 0 /* Normal */);
this.nativeTextViewProtected.titleLabel.textColor = color;
} else {
if (this.formattedText || this.html) {
this._setNativeText();
} else {
this.nativeTextViewProtected.textColor = color;
}
// if (this.formattedText || this.html) {
// this._setNativeText();
// } else {
this.nativeTextViewProtected.textColor = color;
// }
}
}
[linkColorProperty.setNative](value: Color | string) {
Expand Down Expand Up @@ -558,6 +558,10 @@ export class Label extends LabelBase {
} else {
super._setNativeText();
}
if (this.color) {
const color = this.color instanceof Color ? this.color.ios : this.color;
this._setColor(color);
}
this.updateTextContainerInset();
this._requestLayoutOnTextChanged();
}
Expand Down

0 comments on commit 4de4d80

Please sign in to comment.