Merge branch 'bugfix/label-attributedText' into 'release/11_4_0'

fixed issue with attributedText setting not working correctly

See merge request BPHV_MIPS/vds_ios!176
This commit is contained in:
Bruce, Matt R 2024-03-14 23:43:35 +00:00
commit 849dc0a7b9

View File

@ -135,20 +135,18 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
/// Text that will be used in the label. /// Text that will be used in the label.
private var _text: String! private var _text: String!
override open var text: String! { override open var text: String! {
get { _text } didSet {
set { _text = text
textSetMode = .text textSetMode = .text
_text = newValue setNeedsUpdate()
styleText(newValue)
} }
} }
///AttributedText that will be used in the label. ///AttributedText that will be used in the label.
override open var attributedText: NSAttributedString? { override open var attributedText: NSAttributedString? {
get { super.attributedText } didSet {
set {
textSetMode = .attributedText textSetMode = .attributedText
styleAttributedText(newValue) setNeedsUpdate()
} }
} }
@ -424,3 +422,5 @@ open class Label: UILabel, ViewProtocol, UserInfoable {
} }
} }
} }