Code checkin after changing way of implementation.
This commit is contained in:
parent
c94a440008
commit
05aaac573d
@ -95,8 +95,8 @@
|
||||
0AE14F64238315D2005417F8 /* TextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE14F63238315D2005417F8 /* TextField.swift */; };
|
||||
31BE15CB23D8924D00452370 /* CheckboxLabelModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31BE15C923D8924C00452370 /* CheckboxLabelModel.swift */; };
|
||||
31BE15CC23D8924D00452370 /* CheckboxModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31BE15CA23D8924C00452370 /* CheckboxModel.swift */; };
|
||||
5248BFEC23F12E350059236A /* ThreeColumnPlanDataDividerList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5248BFEA23F12E350059236A /* ThreeColumnPlanDataDividerList.swift */; };
|
||||
5248BFED23F12E350059236A /* ThreeColumnPlanDataDividerListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5248BFEB23F12E350059236A /* ThreeColumnPlanDataDividerListModel.swift */; };
|
||||
5248BFEC23F12E350059236A /* ListThreeColumnPlanDataDivider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5248BFEA23F12E350059236A /* ListThreeColumnPlanDataDivider.swift */; };
|
||||
5248BFED23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5248BFEB23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift */; };
|
||||
9432A79F23DB47BA00719041 /* EntryFieldContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9432A79E23DB47BA00719041 /* EntryFieldContainer.swift */; };
|
||||
943784F5236B77BB006A1E82 /* GraphView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F3236B77BB006A1E82 /* GraphView.swift */; };
|
||||
943784F6236B77BB006A1E82 /* GraphViewAnimationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F4236B77BB006A1E82 /* GraphViewAnimationHandler.swift */; };
|
||||
@ -414,8 +414,8 @@
|
||||
0AE14F63238315D2005417F8 /* TextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = "<group>"; };
|
||||
31BE15C923D8924C00452370 /* CheckboxLabelModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckboxLabelModel.swift; sourceTree = "<group>"; };
|
||||
31BE15CA23D8924C00452370 /* CheckboxModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckboxModel.swift; sourceTree = "<group>"; };
|
||||
5248BFEA23F12E350059236A /* ThreeColumnPlanDataDividerList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThreeColumnPlanDataDividerList.swift; sourceTree = "<group>"; };
|
||||
5248BFEB23F12E350059236A /* ThreeColumnPlanDataDividerListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThreeColumnPlanDataDividerListModel.swift; sourceTree = "<group>"; };
|
||||
5248BFEA23F12E350059236A /* ListThreeColumnPlanDataDivider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListThreeColumnPlanDataDivider.swift; sourceTree = "<group>"; };
|
||||
5248BFEB23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListThreeColumnPlanDataDividerModel.swift; sourceTree = "<group>"; };
|
||||
9402C34F23A2CEA3004B974C /* LeftRightLabelModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftRightLabelModel.swift; sourceTree = "<group>"; };
|
||||
9432A79E23DB47BA00719041 /* EntryFieldContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EntryFieldContainer.swift; sourceTree = "<group>"; };
|
||||
943784F3236B77BB006A1E82 /* GraphView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphView.swift; sourceTree = "<group>"; };
|
||||
@ -884,8 +884,8 @@
|
||||
D224798E2316A995003FCCF9 /* HorizontalCombinationViews */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5248BFEA23F12E350059236A /* ThreeColumnPlanDataDividerList.swift */,
|
||||
5248BFEB23F12E350059236A /* ThreeColumnPlanDataDividerListModel.swift */,
|
||||
5248BFEA23F12E350059236A /* ListThreeColumnPlanDataDivider.swift */,
|
||||
5248BFEB23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift */,
|
||||
D2E2A99B23D8D975000B42E6 /* ImageHeadlineBodyModel.swift */,
|
||||
D2B1E3E422F37D6A0065F95C /* ImageHeadlineBody.swift */,
|
||||
D28A838E23CCDEDE00DFE4FC /* TwoButtonViewModel.swift */,
|
||||
@ -1547,7 +1547,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
5248BFED23F12E350059236A /* ThreeColumnPlanDataDividerListModel.swift in Sources */,
|
||||
5248BFED23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift in Sources */,
|
||||
0A5D59C223AD2F5700EFD9E9 /* AppleGuidelinesProtocol.swift in Sources */,
|
||||
943784F5236B77BB006A1E82 /* GraphView.swift in Sources */,
|
||||
31BE15CC23D8924D00452370 /* CheckboxModel.swift in Sources */,
|
||||
@ -1645,7 +1645,7 @@
|
||||
31BE15CB23D8924D00452370 /* CheckboxLabelModel.swift in Sources */,
|
||||
D260105523CEA7DC00764D80 /* MVMCoreUISwitch+Model.swift in Sources */,
|
||||
D29DF13021E6851E003B2FB9 /* MVMCoreUITopAlertShortView.m in Sources */,
|
||||
5248BFEC23F12E350059236A /* ThreeColumnPlanDataDividerList.swift in Sources */,
|
||||
5248BFEC23F12E350059236A /* ListThreeColumnPlanDataDivider.swift in Sources */,
|
||||
0ABD136D237CAD1E0081388D /* DateDropdownEntryField.swift in Sources */,
|
||||
0A7EF85B23D8A52800B2AAD1 /* EntryFieldModel.swift in Sources */,
|
||||
94F217B723E0BF6100A47C06 /* PrimaryButtonView.m in Sources */,
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
//
|
||||
// ThreeColumnPlanDataDividerList.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Acharya, Subhankar on 04/02/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers open class ListThreeColumnPlanDataDivider: TableViewCell {
|
||||
|
||||
let leftHeadlineBody = HeadlineBody(frame: .zero)
|
||||
let centerHeadLineBody = HeadlineBody(frame: .zero)
|
||||
let rightHeadLineBody = HeadlineBody(frame: .zero)
|
||||
private var stack = UIStackView()
|
||||
|
||||
// MARK: - MFViewProtocol
|
||||
open override func updateView(_ size: CGFloat) {
|
||||
super.updateView(size)
|
||||
leftHeadlineBody.updateView(size)
|
||||
centerHeadLineBody.updateView(size)
|
||||
rightHeadLineBody.updateView(size)
|
||||
}
|
||||
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
guard leftHeadlineBody.superview == nil else {
|
||||
return
|
||||
}
|
||||
//using stackView to align the three headlineBody
|
||||
stack.translatesAutoresizingMaskIntoConstraints = false
|
||||
contentView.addSubview(stack)
|
||||
stack.addArrangedSubview(leftHeadlineBody)
|
||||
stack.addArrangedSubview(centerHeadLineBody)
|
||||
stack.addArrangedSubview(rightHeadLineBody)
|
||||
NSLayoutConstraint.constraintPinSubview(stack, pinTop: true, topConstant: 0, pinBottom: false, bottomConstant: 0, pinLeft: true, leftConstant: PaddingDefaultHorizontalSpacing, pinRight: true, rightConstant: PaddingDefaultHorizontalSpacing)
|
||||
stack.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: 0).isActive = true
|
||||
stack.axis = .horizontal
|
||||
stack.spacing = 35
|
||||
stack.distribution = .fillProportionally
|
||||
styleTallDivider()
|
||||
}
|
||||
|
||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let model = model as? ListThreeColumnPlanDataDividerModel else { return }
|
||||
leftHeadlineBody.setWithModel(model.leftHeadlineBody, delegateObject, additionalData)
|
||||
centerHeadLineBody.setWithModel(model.centerHeadlineBody, delegateObject, additionalData)
|
||||
rightHeadLineBody.setWithModel(model.rightHeadlineBody, delegateObject, additionalData)
|
||||
}
|
||||
|
||||
open override func reset() {
|
||||
super.reset()
|
||||
styleTallDivider()
|
||||
leftHeadlineBody.reset()
|
||||
centerHeadLineBody.reset()
|
||||
rightHeadLineBody.reset()
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||
return 103
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
//
|
||||
// ThreeColumnPlanDataDividerListModel.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Acharya, Subhankar on 04/02/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
public class ListThreeColumnPlanDataDividerModel: ContainerModel, ListItemModelProtocol {
|
||||
public var hideArrow: Bool?
|
||||
public var style: String? = "tallDivider"
|
||||
public var line: LineModel?
|
||||
public var backgroundColor: Color?
|
||||
public static var identifier: String = "list3CHBDiv"
|
||||
public var leftHeadlineBody: HeadlineBodyModel
|
||||
public var centerHeadlineBody: HeadlineBodyModel
|
||||
public var rightHeadlineBody: HeadlineBodyModel
|
||||
|
||||
public init(leftHeadlineBody: HeadlineBodyModel, centerHeadlineBody:HeadlineBodyModel, rightHeadlineBody: HeadlineBodyModel) {
|
||||
self.leftHeadlineBody = leftHeadlineBody
|
||||
self.centerHeadlineBody = centerHeadlineBody
|
||||
self.rightHeadlineBody = rightHeadlineBody
|
||||
super.init()
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case leftHeadlineBody
|
||||
case centerHeadlineBody
|
||||
case rightHeadlineBody
|
||||
}
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
leftHeadlineBody = try typeContainer.decode(HeadlineBodyModel.self, forKey: .leftHeadlineBody)
|
||||
centerHeadlineBody = try typeContainer.decode(HeadlineBodyModel.self, forKey: .centerHeadlineBody)
|
||||
rightHeadlineBody = try typeContainer.decode(HeadlineBodyModel.self, forKey: .rightHeadlineBody)
|
||||
try super.init(from: decoder)
|
||||
}
|
||||
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
try super.encode(to: encoder)
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encode(leftHeadlineBody, forKey: .leftHeadlineBody)
|
||||
try container.encode(centerHeadlineBody, forKey: .centerHeadlineBody)
|
||||
try container.encode(rightHeadlineBody, forKey: .rightHeadlineBody)
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ import Foundation
|
||||
// Horizontal Combination Molecules
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: StringAndMoleculeView.self, viewModelClass: StringAndMoleculeModel.self)
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ImageHeadlineBody.self, viewModelClass: ImageHeadlineBodyModel.self)
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ThreeColumnPlanDataDividerList.self, viewModelClass: ThreeColumnPlanDataDividerListModel.self)
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListThreeColumnPlanDataDivider.self, viewModelClass: ListThreeColumnPlanDataDividerModel.self)
|
||||
|
||||
|
||||
// Vertical Combination Molecules
|
||||
|
||||
Loading…
Reference in New Issue
Block a user