model reuse again
This commit is contained in:
parent
f43e018e21
commit
af7e813e18
@ -277,19 +277,12 @@ import UIKit
|
||||
guard let model = model as? TextEntryFieldModel else { return }
|
||||
|
||||
FormValidator.setupValidation(molecule: self, delegate: delegateObject?.formValidationProtocol)
|
||||
|
||||
if let enabledTextColor = model.enabledTextColor {
|
||||
textColor.enabled = enabledTextColor.uiColor
|
||||
}
|
||||
|
||||
if let disabledTextColor = model.disabledTextColor {
|
||||
textColor.disabled = disabledTextColor.uiColor
|
||||
}
|
||||
|
||||
|
||||
textColor.enabled = model.enabledTextColor?.uiColor
|
||||
textColor.disabled = model.disabledTextColor?.uiColor
|
||||
text = model.text
|
||||
placeholder = model.placeholder
|
||||
|
||||
|
||||
switch model.type {
|
||||
case "password":
|
||||
textField.isSecureTextEntry = true
|
||||
|
||||
@ -118,7 +118,7 @@ import UIKit
|
||||
//--------------------------------------------------
|
||||
|
||||
/// Holds reference to delegateObject to inform molecular tableView of an update.
|
||||
weak var delegateObject: MVMCoreUIDelegateObject?
|
||||
var delegateObject: MVMCoreUIDelegateObject?
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Lifecycle
|
||||
@ -271,9 +271,17 @@ import UIKit
|
||||
layoutIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||
//--------------------------------------------------
|
||||
|
||||
open override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
self.delegateObject = delegateObject
|
||||
}
|
||||
}
|
||||
|
||||
// MARK:- MVMCoreUIMoleculeViewProtocol
|
||||
extension EntryFieldContainer {
|
||||
|
||||
override open func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user