This commit is contained in:
Suresh, Kamlesh 2019-12-12 11:47:33 -05:00
parent 7c7232fe6a
commit 9a4a5139ed
3 changed files with 19 additions and 19 deletions

View File

@ -51,16 +51,16 @@ import UIKit
super.updateView(size) super.updateView(size)
dropDown?.updateView(size) dropDown?.updateView(size)
} }
// // MARK: - MoleculeDelegateProtocol public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
// public override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) { bottomSeparatorView?.style = .none
// bottomSeparatorView?.style = .none self.delegateObject = delegateObject
// self.delegateObject = delegateObject super.setWithModel(model, delegateObject, additionalData)
// super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
// dropDown?.mfTextFieldDelegate = delegateObject?.uiTextFieldDelegate as? MFTextFieldDelegate dropDown?.mfTextFieldDelegate = delegateObject?.uiTextFieldDelegate as? MFTextFieldDelegate
// dropDown?.uiTextFieldDelegate = delegateObject?.uiTextFieldDelegate dropDown?.uiTextFieldDelegate = delegateObject?.uiTextFieldDelegate
// dropDown?.setWithJSON(json?.optionalDictionaryForKey("dropDown"), delegateObject: delegateObject, additionalData: additionalData) dropDown?.setWithJSON(json?.optionalDictionaryForKey("dropDown"), delegateObject: delegateObject, additionalData: additionalData)
// } }
public override func reset() { public override func reset() {
super.reset() super.reset()

View File

@ -176,7 +176,7 @@ import UIKit
// override the separator // override the separator
if let separator = model.separator { if let separator = model.separator {
addSeparatorsIfNeeded() addSeparatorsIfNeeded()
(bottomSeparatorView as? ModelMoleculeViewProtocol)?.setWithModel(separator, nil, nil) bottomSeparatorView?.setWithModel(separator, nil, nil)
} }
guard let moleculeModel = model.molecule else { return } guard let moleculeModel = model.molecule else { return }

View File

@ -160,14 +160,14 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
public func removeMolecules(_ molecules: [MoleculeProtocol], sender: UITableViewCell, animation: UITableView.RowAnimation) { public func removeMolecules(_ molecules: [MoleculeProtocol], sender: UITableViewCell, animation: UITableView.RowAnimation) {
var indexPaths: [IndexPath] = [] var indexPaths: [IndexPath] = []
//TODO: cehck for molecule protocola eqality //TODO: cehck for molecule protocola eqality
// for molecule in molecules { for molecule in molecules {
// if let removeIndex = moleculesInfo?.firstIndex(where: { (moleculeInfo) -> Bool in if let removeIndex = moleculesInfo?.firstIndex(where: { (moleculeInfo) -> Bool in
// return molecule == moleculeInfo.molecule return molecule.toJSONString() == moleculeInfo.molecule.toJSONString()
// }) { }) {
// moleculesInfo?.remove(at: removeIndex) moleculesInfo?.remove(at: removeIndex)
// indexPaths.append(IndexPath(row: removeIndex + indexPaths.count, section: 0)) indexPaths.append(IndexPath(row: removeIndex + indexPaths.count, section: 0))
// } }
// } }
self.tableView?.deleteRows(at: indexPaths, with: animation) self.tableView?.deleteRows(at: indexPaths, with: animation)
self.updateViewConstraints() self.updateViewConstraints()
self.view.layoutIfNeeded() self.view.layoutIfNeeded()