From 341aef0184faa956b5163e1141ea6674fa91a044 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 29 May 2019 10:13:48 -0400 Subject: [PATCH] more merge fixes --- MVMCoreUI/Molecules/Switch.swift | 4 ++-- MVMCoreUI/Molecules/SwitchLineItem.swift | 2 +- MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/MVMCoreUI/Molecules/Switch.swift b/MVMCoreUI/Molecules/Switch.swift index 81818ee3..b97496a3 100644 --- a/MVMCoreUI/Molecules/Switch.swift +++ b/MVMCoreUI/Molecules/Switch.swift @@ -35,11 +35,11 @@ import UIKit mvmSwitch.updateView(size) } - open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: DelegateObject?, additionalData: [AnyHashable: Any]?) { + open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) { super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) isRequired = json?[KeyRequired] as? Bool ?? false self.delegateObject = delegateObject - if let delegateObject = delegateObject as? MVMCoreUIDelegateObject { + if let delegateObject = delegateObject { FormValidator.setupValidation(molecule: self, delegate: delegateObject.formValidationProtocol) } if let onColorString = json?.optionalStringForKey("onTintColor") { diff --git a/MVMCoreUI/Molecules/SwitchLineItem.swift b/MVMCoreUI/Molecules/SwitchLineItem.swift index 9a40c482..665de248 100644 --- a/MVMCoreUI/Molecules/SwitchLineItem.swift +++ b/MVMCoreUI/Molecules/SwitchLineItem.swift @@ -45,7 +45,7 @@ import UIKit mfTextButton.updateView(size) } - open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: DelegateObject?, additionalData: [AnyHashable: Any]?) { + open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) { super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) mvmSwitch.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) label.setWithJSON(json?.optionalDictionaryForKey("label"), delegateObject: delegateObject, additionalData: additionalData) diff --git a/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m b/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m index e629dbc1..0d80000b 100644 --- a/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m +++ b/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m @@ -35,8 +35,7 @@ @"caretButton": CaretButton.class, @"textField": MFTextField.class, @"checkbox": MVMCoreUICheckBox.class, - @"listItem": MoleculeTableViewCell.class - @"checkbox": MVMCoreUICheckBox.class, + @"listItem": MoleculeTableViewCell.class, @"switchLineItem": SwitchLineItem.class, @"switch": Switch.class } mutableCopy];