initialisation changes
This commit is contained in:
parent
dde32fd6a4
commit
f3370d6ec6
@ -14,24 +14,18 @@
|
|||||||
public let leftImage = LoadImageView()
|
public let leftImage = LoadImageView()
|
||||||
public let eyebrowHeadlineBodyLink = EyebrowHeadlineBodyLink()
|
public let eyebrowHeadlineBodyLink = EyebrowHeadlineBodyLink()
|
||||||
public let rightLabel = Label(fontStyle: .RegularBodySmall)
|
public let rightLabel = Label(fontStyle: .RegularBodySmall)
|
||||||
public let rightLabelStackItem: StackItem
|
|
||||||
public var stack: Stack<StackModel>
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
public lazy var rightLabelStackItem: StackItem = {
|
||||||
// MARK: - Initializers
|
return StackItem(andContain: rightLabel)
|
||||||
//--------------------------------------------------
|
}()
|
||||||
|
|
||||||
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
public lazy var stack: Stack<StackModel> = {
|
||||||
rightLabelStackItem = StackItem(andContain: rightLabel)
|
return Stack<StackModel>.createStack(with: [
|
||||||
let stackItems = [StackItem(andContain: leftImage), StackItem(andContain: eyebrowHeadlineBodyLink), rightLabelStackItem]
|
(view: leftImage, model: StackItemModel(horizontalAlignment: .fill)),
|
||||||
let stackModel = StackModel(molecules: [StackItemModel(horizontalAlignment: .fill), StackItemModel(horizontalAlignment: .fill), StackItemModel(horizontalAlignment: .fill)], axis: .horizontal)
|
(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .fill)),
|
||||||
stack = Stack<StackModel>(with: stackModel, stackItems: stackItems)
|
(view: rightLabelStackItem, model: StackItemModel(horizontalAlignment: .fill,verticalAlignment: .top))],
|
||||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
axis: .horizontal)
|
||||||
}
|
}()
|
||||||
|
|
||||||
public required init?(coder aDecoder: NSCoder) {
|
|
||||||
fatalError("init(coder:) has not been implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
open override func alignAccessoryToHero() -> CGPoint? {
|
open override func alignAccessoryToHero() -> CGPoint? {
|
||||||
// Ensures that the right label is centered vertically with headline.
|
// Ensures that the right label is centered vertically with headline.
|
||||||
|
|||||||
@ -26,7 +26,7 @@ public class ListLeftVariableIconWithRightCaretAllTextLinksModel: ListItemModel,
|
|||||||
image.width = 30
|
image.width = 30
|
||||||
image.height = 30
|
image.height = 30
|
||||||
}
|
}
|
||||||
eyebrowHeadlineBodyLink.headline?.hero = 0
|
rightLabel.hero = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user