updated spacing
This commit is contained in:
parent
d25d75fea0
commit
5e707d29a0
@ -12,7 +12,7 @@
|
|||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
public let leftImage = LoadImageView(pinnedEdges: .all)
|
public let leftImage = LoadImageView(pinnedEdges: .all)
|
||||||
public let eyebrowHeadlineBodyLink = EyebrowHeadlineBodyLink()
|
public let eyebrowHeadlineBodyLink = EyebrowHeadlineBodyLink(spacing: 2.0)
|
||||||
public let rightLabel = Label(fontStyle: .RegularBodySmall)
|
public let rightLabel = Label(fontStyle: .RegularBodySmall)
|
||||||
|
|
||||||
public lazy var rightLabelStackItem: StackItem = {
|
public lazy var rightLabelStackItem: StackItem = {
|
||||||
|
|||||||
@ -22,6 +22,16 @@
|
|||||||
get { return model as? EyebrowHeadlineBodyLinkModel }
|
get { return model as? EyebrowHeadlineBodyLinkModel }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initialization
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public convenience init(spacing: CGFloat) {
|
||||||
|
self.init(frame: .zero)
|
||||||
|
stack.stackModel?.spacing = spacing
|
||||||
|
stack.restack()
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - MFViewProtocol
|
// MARK: - MFViewProtocol
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -29,7 +39,7 @@
|
|||||||
open override func setupView() {
|
open override func setupView() {
|
||||||
super.setupView()
|
super.setupView()
|
||||||
stack.setAndCreateModel(with: [eyebrow, headline, body, link])
|
stack.setAndCreateModel(with: [eyebrow, headline, body, link])
|
||||||
stack.stackModel?.spacing = 2.0
|
stack.stackModel?.spacing = 0
|
||||||
addSubview(stack)
|
addSubview(stack)
|
||||||
NSLayoutConstraint.constraintPinSubview(toSuperview: stack)
|
NSLayoutConstraint.constraintPinSubview(toSuperview: stack)
|
||||||
stack.restack()
|
stack.restack()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user