fix for setting text issue
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
ce8e2fb535
commit
e52ae195f3
@ -129,12 +129,18 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
|
||||
/// Line break mode for the label, default is set to word wrapping.
|
||||
open override var lineBreakMode: NSLineBreakMode { didSet { setNeedsUpdate() }}
|
||||
|
||||
private var _text: String?
|
||||
|
||||
/// Text that will be used in the label.
|
||||
override open var text: String? {
|
||||
didSet {
|
||||
useAttributedText = false
|
||||
attributes = nil
|
||||
setNeedsUpdate()
|
||||
get { _text }
|
||||
set {
|
||||
if _text != newValue {
|
||||
_text = newValue
|
||||
useAttributedText = false
|
||||
attributes = nil
|
||||
setNeedsUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -194,7 +200,7 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
|
||||
|
||||
open func updateView() {
|
||||
if !useAttributedText {
|
||||
if let text = text {
|
||||
if let text {
|
||||
accessibilityCustomActions = []
|
||||
|
||||
//create the primary string
|
||||
|
||||
Loading…
Reference in New Issue
Block a user