small corrections
This commit is contained in:
parent
25ce6b285f
commit
83d15aeba4
@ -16,20 +16,20 @@ import Foundation
|
||||
public var topLeftHeadlineBody = HeadlineBody()
|
||||
public var topCenterHeadlineBody = HeadlineBody()
|
||||
public var topRightHeadlineBody = HeadlineBody()
|
||||
public var tophorizontalStack: Stack<StackModel>
|
||||
public var topHorizontalStack: Stack<StackModel>
|
||||
public var bottomLeftHeadlineBody = HeadlineBody()
|
||||
public var bottomCenterHeadlineBody = HeadlineBody()
|
||||
public var bottomRightHeadlineBody = HeadlineBody()
|
||||
public var bottomhorizontalStack: Stack<StackModel>
|
||||
public var bottomHorizontalStack: Stack<StackModel>
|
||||
public var stack: Stack<StackModel>
|
||||
|
||||
//------------------------------------------------------
|
||||
// MARK: - Initializers
|
||||
//------------------------------------------------------
|
||||
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
tophorizontalStack = Stack<StackModel>.createStack(with: [(view: topLeftHeadlineBody, model: StackItemModel(percent: 37, verticalAlignment: .top)), (view: topCenterHeadlineBody, model: StackItemModel(percent: 33, verticalAlignment: .top)), (view: topRightHeadlineBody, model: StackItemModel(percent: 30, verticalAlignment: .top))], axis: .horizontal)
|
||||
bottomhorizontalStack = Stack<StackModel>.createStack(with: [(view: bottomLeftHeadlineBody, model: StackItemModel(percent: 37, verticalAlignment: .top)), (view: bottomCenterHeadlineBody, model: StackItemModel(percent: 33, verticalAlignment: .top)), (view: bottomRightHeadlineBody, model: StackItemModel(percent: 30, verticalAlignment: .top))], axis: .horizontal)
|
||||
stack = Stack<StackModel>.createStack(with: [(view: title, model: StackItemModel(horizontalAlignment: .leading)), (view: tophorizontalStack, model: StackItemModel(spacing: 2, horizontalAlignment: .leading)), (view: bottomhorizontalStack, model: StackItemModel(horizontalAlignment: .leading))], axis: .vertical)
|
||||
topHorizontalStack = Stack<StackModel>.createStack(with: [(view: topLeftHeadlineBody, model: StackItemModel(percent: 37, verticalAlignment: .top)), (view: topCenterHeadlineBody, model: StackItemModel(percent: 33, verticalAlignment: .top)), (view: topRightHeadlineBody, model: StackItemModel(percent: 30, verticalAlignment: .top))], axis: .horizontal)
|
||||
bottomHorizontalStack = Stack<StackModel>.createStack(with: [(view: bottomLeftHeadlineBody, model: StackItemModel(percent: 37, verticalAlignment: .top)), (view: bottomCenterHeadlineBody, model: StackItemModel(percent: 33, verticalAlignment: .top)), (view: bottomRightHeadlineBody, model: StackItemModel(percent: 30, verticalAlignment: .top))], axis: .horizontal)
|
||||
stack = Stack<StackModel>.createStack(with: [(view: title, model: StackItemModel()), (view: topHorizontalStack, model: StackItemModel(spacing: 2)), (view: bottomHorizontalStack, model: StackItemModel())], axis: .vertical)
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
}
|
||||
|
||||
@ -42,11 +42,10 @@ import Foundation
|
||||
//------------------------------------------------------
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
title.numberOfLines = 1
|
||||
addMolecule(stack)
|
||||
stack.restack()
|
||||
tophorizontalStack.restack()
|
||||
bottomhorizontalStack.restack()
|
||||
topHorizontalStack.restack()
|
||||
bottomHorizontalStack.restack()
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
@ -56,8 +55,8 @@ import Foundation
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
guard let model = model as? ListThreeColumnSpeedTestModel else { return }
|
||||
title.set(with: model.title, delegateObject, additionalData)
|
||||
tophorizontalStack.updateContainedMolecules(with: [model.topLeftHeadlineBody, model.topCenterHeadlineBody, model.topRightHeadlineBody], delegateObject, additionalData)
|
||||
bottomhorizontalStack.updateContainedMolecules(with: [model.bottomLeftHeadlineBody, model.bottomCenterHeadlineBody, model.bottomRightHeadlineBody], delegateObject, additionalData)
|
||||
topHorizontalStack.updateContainedMolecules(with: [model.topLeftHeadlineBody, model.topCenterHeadlineBody, model.topRightHeadlineBody], delegateObject, additionalData)
|
||||
bottomHorizontalStack.updateContainedMolecules(with: [model.bottomLeftHeadlineBody, model.bottomCenterHeadlineBody, model.bottomRightHeadlineBody], delegateObject, additionalData)
|
||||
updateAccessibilityLabel()
|
||||
}
|
||||
|
||||
|
||||
@ -52,10 +52,11 @@ public class ListThreeColumnSpeedTestModel: ListItemModel, MoleculeModelProtocol
|
||||
func styleHeadlineBody(_ headlineBodyModel: HeadlineBodyModel, _ isBodyMicro: Bool) {
|
||||
headlineBodyModel.headline?.fontStyle = .RegularMicro
|
||||
headlineBodyModel.headline?.textColor = Color(uiColor: .mvmCoolGray6)
|
||||
headlineBodyModel.body?.fontStyle = .RegularBodySmall
|
||||
if isBodyMicro {
|
||||
headlineBodyModel.body?.fontStyle = .RegularMicro
|
||||
headlineBodyModel.body?.textColor = Color(uiColor: .mvmCoolGray6)
|
||||
} else {
|
||||
headlineBodyModel.body?.fontStyle = .RegularBodySmall
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user