mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Hanlde hint color reset properly in iOS (#4968)
This commit is contained in:
committed by
Hristo Hristov
parent
69199a5df2
commit
188c1f2568
@@ -218,14 +218,12 @@ export class TextField extends TextFieldBase {
|
||||
// nativeView.attributedPlaceholder will be null
|
||||
stringValue = " ";
|
||||
}
|
||||
if (placeholderColorProperty.isSet(this.style)) {
|
||||
const attributedPlaceholder = NSAttributedString.alloc().initWithStringAttributes(stringValue, <any>{
|
||||
[NSForegroundColorAttributeName]: this.style.placeholderColor.ios
|
||||
});
|
||||
this.nativeViewProtected.attributedPlaceholder = attributedPlaceholder;
|
||||
} else {
|
||||
this.nativeViewProtected.placeholder = stringValue;
|
||||
const attributes: any = {};
|
||||
if (this.style.placeholderColor) {
|
||||
attributes[NSForegroundColorAttributeName] = this.style.placeholderColor.ios;
|
||||
}
|
||||
const attributedPlaceholder = NSAttributedString.alloc().initWithStringAttributes(stringValue, attributes);
|
||||
this.nativeViewProtected.attributedPlaceholder = attributedPlaceholder;
|
||||
}
|
||||
|
||||
[paddingTopProperty.getDefault](): Length {
|
||||
|
||||
Reference in New Issue
Block a user