Merge branch 'develop' into bugfix/textkit_fragment_fix

This commit is contained in:
Kevin G Christiano 2021-02-24 09:37:18 -05:00
commit 793c12811d
2 changed files with 4 additions and 4 deletions

View File

@ -594,6 +594,7 @@ public typealias ActionBlock = () -> ()
attributedText = attributedString
}
@objc public func updateView(_ size: CGFloat) {
scaleSize = size as NSNumber
@ -623,9 +624,6 @@ public typealias ActionBlock = () -> ()
} else if !MVMCoreGetterUtility.fequal(a: Float(standardFontSize), b: 0.0), let sizeObject = sizeObject ?? MFStyler.sizeObjectGeneric(forCurrentDevice: standardFontSize) {
font = font.updateSize(sizeObject.getValueBased(onSize: size))
}
// Provide the label additional size information to help calculate its intrinsic content.
preferredMaxLayoutWidth = Styler.maxAvailableLayoutWidth(size: size)
}
@objc public func setFont(_ font: UIFont, scale: Bool) {

View File

@ -22,7 +22,7 @@
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
// Fill for left vertical alignment because bottom constraint was breaking with leading. CXTDT-145456
stack = Stack<StackModel>.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .fill)), (view: rightLabel, model: StackItemModel(horizontalAlignment:.fill, verticalAlignment: .leading))], axis: .horizontal)
stack = Stack<StackModel>.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .fill)), (view: rightLabel, model: StackItemModel(horizontalAlignment: .trailing, verticalAlignment: .leading))], axis: .horizontal)
super.init(style: style, reuseIdentifier: reuseIdentifier)
}
@ -37,6 +37,8 @@
open override func setupView() {
super.setupView()
rightLabel.setContentCompressionResistancePriority(UILayoutPriority(rawValue: 900), for: .horizontal)
rightLabel.setContentHuggingPriority(UILayoutPriority(rawValue: 900), for: .horizontal)
rightLabel.numberOfLines = 1
addMolecule(stack)
stack.restack()
}