fix for 3.0
This commit is contained in:
parent
7ce534de10
commit
eb195afe1d
@ -402,11 +402,11 @@ public typealias ActionBlock = () -> ()
|
||||
attributedString.insert(mutableString, at: imageAtt.location)
|
||||
|
||||
case let fontAtt as LabelAttributeFontModel:
|
||||
if let fontStyle = fontAtt.style?.rawValue {
|
||||
let styles = MFStyler.styleGetAttributedString("0", withStyle: fontStyle)
|
||||
if let fontStyle = fontAtt.style {
|
||||
attributedString.removeAttribute(.font, range: range)
|
||||
attributedString.removeAttribute(.foregroundColor, range: range)
|
||||
attributedString.addAttributes(styles.attributes(at: 0, effectiveRange: nil), range: range)
|
||||
attributedString.addAttribute(.font, value: fontStyle.getFont(), range: range)
|
||||
attributedString.addAttribute(.foregroundColor, value: fontStyle.color(), range: range)
|
||||
} else {
|
||||
let fontSize = fontAtt.size
|
||||
var font: UIFont?
|
||||
|
||||
@ -81,6 +81,16 @@ open class Styler {
|
||||
}
|
||||
}
|
||||
|
||||
public func color() -> UIColor {
|
||||
switch self {
|
||||
case .B3:
|
||||
return .mvmCoolGray6
|
||||
|
||||
default:
|
||||
return .mvmBlack
|
||||
}
|
||||
}
|
||||
|
||||
/// Determines if the selected font case is bold or regular.
|
||||
public func isBold() -> Bool {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user