From b4859988c20a42df28de56757cc508c0063993c9 Mon Sep 17 00:00:00 2001 From: "Murugan, Vimal" Date: Mon, 13 Jan 2020 19:52:04 +0530 Subject: [PATCH] set with json removed --- .../Molecules/LabelRightMoleculesStack.swift | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/MVMCoreUI/Molecules/LabelRightMoleculesStack.swift b/MVMCoreUI/Molecules/LabelRightMoleculesStack.swift index 4cb5a89b..58a5ba7b 100644 --- a/MVMCoreUI/Molecules/LabelRightMoleculesStack.swift +++ b/MVMCoreUI/Molecules/LabelRightMoleculesStack.swift @@ -72,11 +72,6 @@ class LeftLabelRightMoleculeContainer: View { super.init(frame: frame) } - public init(withJSON json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) { - super.init(frame: CGRect.zero) - setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) - } - public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } @@ -157,28 +152,6 @@ class LeftLabelRightMoleculeContainer: View { } } - override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) { - super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) - let previousMoleculeName = rightMoleculeName - removeSubviewsInRightContainer() - guard let moleculeJSON = json, let _ = moleculeJSON.optionalStringForKey(KeyMoleculeName) else { - super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) - return - } - - label.text = leftText - rightMoleculeName = moleculeJSON.optionalStringForKey(KeyMoleculeName) - //For reuse purpose check that allready added molecule is same - if let rightMolecule = self.rightMolecule, previousMoleculeName == rightMoleculeName { - rightMolecule.setWithJSON(moleculeJSON, delegateObject: delegateObject, additionalData: additionalData) - addView(rightMolecule) - } else { - if let molecule = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(forJSON: moleculeJSON, delegateObject: delegateObject, constrainIfNeeded: false) { - addView(molecule) - } - } - } - func updateLeftViewWidthConstraint(_ percent: CGFloat) { percentage = percent leftWidthConstraint?.isActive = false