Commit 93dd75be by Orkhan Alikhanov

Sync placeholderLabel alignment with TextView

parent fdf7dd71
...@@ -264,13 +264,9 @@ open class TextField: UITextField { ...@@ -264,13 +264,9 @@ open class TextField: UITextField {
/// Handles the textAlignment of the placeholderLabel. /// Handles the textAlignment of the placeholderLabel.
open override var textAlignment: NSTextAlignment { open override var textAlignment: NSTextAlignment {
get { didSet {
return super.textAlignment placeholderLabel.textAlignment = textAlignment
} detailLabel.textAlignment = textAlignment
set(value) {
super.textAlignment = value
placeholderLabel.textAlignment = value
detailLabel.textAlignment = value
} }
} }
......
...@@ -162,6 +162,13 @@ open class TextView: UITextView { ...@@ -162,6 +162,13 @@ open class TextView: UITextView {
} }
} }
/// Handles the textAlignment of the placeholderLabel and textView itself.
open override var textAlignment: NSTextAlignment {
didSet {
placeholderLabel.textAlignment = textAlignment
}
}
/** /**
An initializer that initializes the object with a NSCoder object. An initializer that initializes the object with a NSCoder object.
- Parameter aDecoder: A NSCoder instance. - Parameter aDecoder: A NSCoder instance.
......
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