allow for textColor first.
This commit is contained in:
parent
eba33717b5
commit
7643b86b51
@ -324,7 +324,9 @@ public typealias ActionBlock = () -> ()
|
||||
switch attribute {
|
||||
case let underlineAtt as LabelAttributeUnderlineModel:
|
||||
attributedString.addAttribute(.underlineStyle, value: underlineAtt.underlineValue.rawValue, range: range)
|
||||
attributedString.addAttribute(.underlineColor, value: underlineAtt.color.uiColor, range: range)
|
||||
if let underlineColor = underlineAtt.color?.uiColor {
|
||||
attributedString.addAttribute(.underlineColor, value: underlineColor, range: range)
|
||||
}
|
||||
|
||||
case _ as LabelAttributeStrikeThroughModel:
|
||||
attributedString.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.thick.rawValue, range: range)
|
||||
|
||||
@ -29,7 +29,7 @@ import UIKit
|
||||
}
|
||||
}
|
||||
|
||||
var color: Color = Color(uiColor: .mvmBlack)
|
||||
var color: Color?
|
||||
var style: UnderlineStyle = .single
|
||||
var pattern: UnderlineStyle.Pattern?
|
||||
|
||||
@ -64,7 +64,7 @@ import UIKit
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
try super.encode(to: encoder)
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(color, forKey: .color)
|
||||
try container.encodeIfPresent(color, forKey: .color)
|
||||
try container.encode(style, forKey: .style)
|
||||
try container.encodeIfPresent(pattern, forKey: .pattern)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user