Commit 93dd75be by Orkhan Alikhanov

Sync placeholderLabel alignment with TextView

parent fdf7dd71
......@@ -264,13 +264,9 @@ open class TextField: UITextField {
/// Handles the textAlignment of the placeholderLabel.
open override var textAlignment: NSTextAlignment {
get {
return super.textAlignment
}
set(value) {
super.textAlignment = value
placeholderLabel.textAlignment = value
detailLabel.textAlignment = value
didSet {
placeholderLabel.textAlignment = textAlignment
detailLabel.textAlignment = textAlignment
}
}
......
......@@ -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.
- 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