Try again
This commit is contained in:
parent
8fdb4c3e14
commit
740545e9c3
@ -674,12 +674,15 @@ public typealias ActionBlock = () -> ()
|
|||||||
setScale(scale)
|
setScale(scale)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open override func layoutSubviews() {
|
||||||
|
super.layoutSubviews()
|
||||||
|
|
||||||
|
// This fixes a defect for when there are multiple labels stacked in a list item. Sometime some labels will not fill their available space.
|
||||||
|
preferredMaxLayoutWidth = frame.width
|
||||||
|
}
|
||||||
|
|
||||||
@objc public func updateView(_ size: CGFloat) {
|
@objc public func updateView(_ size: CGFloat) {
|
||||||
scaleSize = size as NSNumber
|
scaleSize = size as NSNumber
|
||||||
|
|
||||||
// This fixes a defect for when there are multiple labels stacked in a list item. Sometime some labels will not fill their available space.
|
|
||||||
preferredMaxLayoutWidth = size
|
|
||||||
|
|
||||||
if let originalAttributedString = originalAttributedString {
|
if let originalAttributedString = originalAttributedString {
|
||||||
let attributedString = NSMutableAttributedString(attributedString: originalAttributedString)
|
let attributedString = NSMutableAttributedString(attributedString: originalAttributedString)
|
||||||
attributedString.removeAttribute(.font, range: NSRange(location: 0, length: attributedString.length))
|
attributedString.removeAttribute(.font, range: NSRange(location: 0, length: attributedString.length))
|
||||||
@ -878,10 +881,6 @@ extension Label {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
public func horizontalAlignment() -> UIStackView.Alignment {
|
|
||||||
return .leading
|
|
||||||
}
|
|
||||||
|
|
||||||
public func copyBackgroundColor() -> Bool {
|
public func copyBackgroundColor() -> Bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import Foundation
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||||
stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(horizontalAlignment: .fill)),
|
stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(horizontalAlignment: .fill)),
|
||||||
(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading))],
|
(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .fill))],
|
||||||
axis: .horizontal)
|
axis: .horizontal)
|
||||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||||
}
|
}
|
||||||
@ -35,6 +35,7 @@ import Foundation
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
override open func setupView() {
|
override open func setupView() {
|
||||||
super.setupView()
|
super.setupView()
|
||||||
|
leftLabel.setContentHuggingPriority(.defaultHigh, for: .horizontal)
|
||||||
addMolecule(stack)
|
addMolecule(stack)
|
||||||
stack.restack()
|
stack.restack()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user