move files

This commit is contained in:
Pfeil, Scott Robert 2020-06-23 12:14:10 -04:00
parent 384158e855
commit 3add9702c6

View File

@ -1,95 +0,0 @@
//
// HeadersH2PricingTwoRows.swift
// MVMCoreUI
//
// Created by Lekshmi S on 16/06/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
@objcMembers open class HeadersH2PricingTwoRows: HeaderView {
//--------------------------------------------------
// MARK: - Outlets
//--------------------------------------------------
public let headline = Label(fontStyle: .H2)
public let body = Label(fontStyle: .B2)
public let subBody = Label(fontStyle: .B3)
public let body2 = Label(fontStyle: .B2)
public let subBody2 = Label(fontStyle: .B3)
public let body3 = Label(fontStyle: .B2)
public let subBody3 = Label(fontStyle: .B3)
public let verticalLine1 = Line()
public let verticalLine2 = Line()
public let verticalStack1: Stack<StackModel>
public let verticalStack2: Stack<StackModel>
public let verticalStack3: Stack<StackModel>
public let horizontalStack: Stack<StackModel>
public let stack: Stack<StackModel>
//-------------------------------------------------------
// MARK: - Initializers
//-------------------------------------------------------
public override init(frame: CGRect) {
verticalStack1 = Stack<StackModel>.createStack(with: [body, subBody], spacing: 0)
verticalStack2 = Stack<StackModel>.createStack(with: [body2, subBody2], spacing: 0)
verticalStack3 = Stack<StackModel>.createStack(with: [body3, subBody3], spacing: 0)
horizontalStack = Stack<StackModel>.createStack(with: [(view: verticalStack1, model: StackItemModel(percent: 29, horizontalAlignment: .leading, verticalAlignment: .top)), (view: verticalLine1, model: StackItemModel(percent: 2, verticalAlignment: .top)),
(view: verticalStack2, model: StackItemModel(percent: 33, horizontalAlignment: .center, verticalAlignment: .top)),
(view: verticalLine2, model: StackItemModel(percent: 2, verticalAlignment: .top)),
(view: verticalStack3, model: StackItemModel(percent: 34, horizontalAlignment: .center, verticalAlignment: .top))],
axis: .horizontal)
stack = Stack<StackModel>.createStack(with: [headline, horizontalStack], spacing: 8)
super.init(frame: frame)
}
public required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
//-------------------------------------------------------
// MARK: - Lifecycle
//-------------------------------------------------------
open override func setupView() {
super.setupView()
verticalLine1.widthConstraint?.isActive = true
verticalLine1.backgroundColor = .mvmBlack
verticalLine1.heightConstraint?.constant = 13
verticalLine2.widthConstraint?.isActive = true
verticalLine2.backgroundColor = .mvmBlack
verticalLine2.heightConstraint?.constant = 13
addMolecule(stack)
stack.restack()
verticalStack1.restack()
verticalStack2.restack()
verticalStack3.restack()
horizontalStack.restack()
}
//----------------------------------------------------
// MARK: - Molecule
//------------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData)
guard let model = model as? HeadersH2PricingTwoRowsModel else { return }
headline.set(with: model.headline, delegateObject, additionalData)
verticalStack1.updateContainedMolecules(with: [model.body, model.subBody], delegateObject, additionalData)
verticalStack2.updateContainedMolecules(with: [model.body2, model.subBody2], delegateObject, additionalData)
verticalStack3.updateContainedMolecules(with: [model.body3, model.subBody3], delegateObject, additionalData)
}
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
return 121
}
open override func reset() {
super.reset()
headline.setFontStyle(.H2)
body.setFontStyle(.B2)
subBody.setFontStyle(.B3)
body2.setFontStyle(.B2)
subBody2.setFontStyle(.B3)
body3.setFontStyle(.B2)
subBody3.setFontStyle(.B3)
}
}