mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
asdf
This commit is contained in:
@@ -205,6 +205,7 @@ export class TextBase extends TextBaseCommon {
|
||||
if (isTextView) {
|
||||
// UITextView's font seems to change inside.
|
||||
dict.set(NSFontAttributeName, this.nativeTextViewProtected.font);
|
||||
dict.set(NSForegroundColorAttributeName, this.nativeTextViewProtected.textColor);
|
||||
}
|
||||
|
||||
const result = NSMutableAttributedString.alloc().initWithString(source);
|
||||
|
||||
@@ -114,6 +114,7 @@ export class TextView extends EditableTextBase implements TextViewDefinition {
|
||||
public _isEditing: boolean;
|
||||
|
||||
createNativeView() {
|
||||
debugger;
|
||||
const textView = NoScrollAnimationUITextView.new();
|
||||
if (!textView.font) {
|
||||
textView.font = UIFont.systemFontOfSize(12);
|
||||
@@ -163,6 +164,7 @@ export class TextView extends EditableTextBase implements TextViewDefinition {
|
||||
}
|
||||
|
||||
private _refreshColor() {
|
||||
debugger;
|
||||
if (this._isShowingHint) {
|
||||
const placeholderColor = this.style.placeholderColor;
|
||||
const color = this.style.color;
|
||||
@@ -173,7 +175,7 @@ export class TextView extends EditableTextBase implements TextViewDefinition {
|
||||
// Use semi-transparent version of color for back-compatibility
|
||||
this.nativeTextViewProtected.textColor = color.ios.colorWithAlphaComponent(0.22);
|
||||
} else {
|
||||
this.nativeTextViewProtected.textColor = UIColor.blackColor.colorWithAlphaComponent(0.22);
|
||||
this.nativeTextViewProtected.textColor = UIColor.labelColor;
|
||||
}
|
||||
} else {
|
||||
const color = this.style.color;
|
||||
@@ -182,8 +184,8 @@ export class TextView extends EditableTextBase implements TextViewDefinition {
|
||||
this.nativeTextViewProtected.textColor = color.ios;
|
||||
this.nativeTextViewProtected.tintColor = color.ios;
|
||||
} else {
|
||||
this.nativeTextViewProtected.textColor = null;
|
||||
this.nativeTextViewProtected.tintColor = null;
|
||||
this.nativeTextViewProtected.textColor = UIColor.labelColor;
|
||||
this.nativeTextViewProtected.tintColor = UIColor.tintColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -329,4 +331,4 @@ export class TextView extends EditableTextBase implements TextViewDefinition {
|
||||
}
|
||||
}
|
||||
|
||||
TextView.prototype.recycleNativeView = "auto";
|
||||
TextView.prototype.recycleNativeView = "auto";
|
||||
|
||||
Reference in New Issue
Block a user