Skip to content

Commit 953b90a

Browse files
committed
fix: ios letterSpacing was breaking other attributes
1 parent f36385f commit 953b90a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: src/label.ios.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,13 @@ export class Label extends LabelBase {
451451
dict.set(NSParagraphStyleAttributeName, paragraphStyle);
452452
}
453453
const source = getTransformedText(isNullOrUndefined(this.text) ? '' : `${this.text}`, this.textTransform);
454-
if (dict.size > 0 || isTextView) {
455-
if (isTextView && this.nativeTextViewProtected.font) {
456-
// UITextView's font seems to change inside.
454+
if (dict.size > 0) {
455+
if (this.nativeTextViewProtected.font) {
457456
dict.set(NSFontAttributeName, this.nativeTextViewProtected.font);
458457
}
458+
if (style.color) {
459+
dict.set(NSForegroundColorAttributeName, style.color.ios);
460+
}
459461
const result = NSMutableAttributedString.alloc().initWithString(source);
460462
result.setAttributesRange(dict as any, {
461463
location: 0,

0 commit comments

Comments
 (0)