Hanlde hint color reset properly in iOS (#4968)

This commit is contained in:
Panayot Cankov
2017-10-20 08:31:18 +03:00
committed by Hristo Hristov
parent 69199a5df2
commit 188c1f2568

View File

@@ -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 {