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)
|
attributedString.insert(mutableString, at: imageAtt.location)
|
||||||
|
|
||||||
case let fontAtt as LabelAttributeFontModel:
|
case let fontAtt as LabelAttributeFontModel:
|
||||||
if let fontStyle = fontAtt.style?.rawValue {
|
if let fontStyle = fontAtt.style {
|
||||||
let styles = MFStyler.styleGetAttributedString("0", withStyle: fontStyle)
|
|
||||||
attributedString.removeAttribute(.font, range: range)
|
attributedString.removeAttribute(.font, range: range)
|
||||||
attributedString.removeAttribute(.foregroundColor, 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 {
|
} else {
|
||||||
let fontSize = fontAtt.size
|
let fontSize = fontAtt.size
|
||||||
var font: UIFont?
|
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.
|
/// Determines if the selected font case is bold or regular.
|
||||||
public func isBold() -> Bool {
|
public func isBold() -> Bool {
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user