diff --git a/nativescript-core/ui/html-view/html-view.ios.ts b/nativescript-core/ui/html-view/html-view.ios.ts
index f0cb9dcb4..3252c3626 100644
--- a/nativescript-core/ui/html-view/html-view.ios.ts
+++ b/nativescript-core/ui/html-view/html-view.ios.ts
@@ -1,9 +1,12 @@
import {
HtmlViewBase, View, layout, htmlProperty
} from "./html-view-common";
+import { ios } from "../../utils/utils";
export * from "./html-view-common";
+const majorVersion = ios.MajorVersion;
+
export class HtmlView extends HtmlViewBase {
nativeViewProtected: UITextView;
@@ -50,6 +53,14 @@ export class HtmlView extends HtmlViewBase {
[htmlProperty.setNative](value: string) {
const htmlString = NSString.stringWithString(value + "");
const nsData = htmlString.dataUsingEncoding(NSUnicodeStringEncoding);
- this.nativeViewProtected.attributedText = NSAttributedString.alloc().initWithDataOptionsDocumentAttributesError(nsData, { [NSDocumentTypeDocumentAttribute]: NSHTMLTextDocumentType }, null);
+ this.nativeViewProtected.attributedText = NSAttributedString.alloc().initWithDataOptionsDocumentAttributesError(
+ nsData,
+ { [NSDocumentTypeDocumentAttribute]: NSHTMLTextDocumentType },
+ null
+ );
+
+ if (majorVersion >= 13) {
+ this.nativeViewProtected.textColor = UIColor.labelColor;
+ }
}
}
diff --git a/nativescript-core/ui/text-base/text-base.ios.ts b/nativescript-core/ui/text-base/text-base.ios.ts
index c7c07218b..4665757c0 100644
--- a/nativescript-core/ui/text-base/text-base.ios.ts
+++ b/nativescript-core/ui/text-base/text-base.ios.ts
@@ -153,6 +153,10 @@ export class TextBase extends TextBaseCommon {
this.nativeTextViewProtected.setAttributedTitleForState(attrText, UIControlState.Normal);
}
else {
+ if (majorVersion >= 13) {
+ this.nativeTextViewProtected.textColor = UIColor.labelColor;
+ }
+
this.nativeTextViewProtected.attributedText = attrText;
}
}