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.
|
/// Line break mode for the label, default is set to word wrapping.
|
||||||
open override var lineBreakMode: NSLineBreakMode { didSet { setNeedsUpdate() }}
|
open override var lineBreakMode: NSLineBreakMode { didSet { setNeedsUpdate() }}
|
||||||
|
|
||||||
|
private var _text: String?
|
||||||
|
|
||||||
/// Text that will be used in the label.
|
/// Text that will be used in the label.
|
||||||
override open var text: String? {
|
override open var text: String? {
|
||||||
didSet {
|
get { _text }
|
||||||
useAttributedText = false
|
set {
|
||||||
attributes = nil
|
if _text != newValue {
|
||||||
setNeedsUpdate()
|
_text = newValue
|
||||||
|
useAttributedText = false
|
||||||
|
attributes = nil
|
||||||
|
setNeedsUpdate()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +200,7 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
|
|||||||
|
|
||||||
open func updateView() {
|
open func updateView() {
|
||||||
if !useAttributedText {
|
if !useAttributedText {
|
||||||
if let text = text {
|
if let text {
|
||||||
accessibilityCustomActions = []
|
accessibilityCustomActions = []
|
||||||
|
|
||||||
//create the primary string
|
//create the primary string
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user