fixes
This commit is contained in:
parent
7c7232fe6a
commit
9a4a5139ed
@ -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()
|
||||||
|
|||||||
@ -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 }
|
||||||
|
|||||||
@ -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()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user