Commit 7d45b943 by Daniel Dahan

issue-849: Fixed issue where TextView.placeholderNormalColor was not working and…

issue-849: Fixed issue where TextView.placeholderNormalColor was not working and now updated the property to TextView.placeholderColor. Closes #849
parent a003a5c7
...@@ -132,15 +132,7 @@ open class TextView: UITextView { ...@@ -132,15 +132,7 @@ open class TextView: UITextView {
/// Placeholder normal text /// Placeholder normal text
@IBInspectable @IBInspectable
open var placeholderNormalColor = Color.darkText.others { open var placeholderColor = Color.darkText.others {
didSet {
updatePlaceholderLabelColor()
}
}
/// Placeholder active text
@IBInspectable
open var placeholderActiveColor = Color.blue.base {
didSet { didSet {
updatePlaceholderLabelColor() updatePlaceholderLabelColor()
} }
...@@ -317,8 +309,8 @@ fileprivate extension TextView { ...@@ -317,8 +309,8 @@ fileprivate extension TextView {
fileprivate extension TextView { fileprivate extension TextView {
/// Updates the placeholderLabel text color. /// Updates the placeholderLabel text color.
func updatePlaceholderLabelColor() { func updatePlaceholderLabelColor() {
tintColor = placeholderActiveColor tintColor = placeholderColor
placeholderLabel.textColor = isEditing ? placeholderActiveColor : placeholderNormalColor placeholderLabel.textColor = placeholderColor
} }
/// Updates the placeholderLabel visibility. /// Updates the placeholderLabel visibility.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment