latest
This commit is contained in:
parent
020030e669
commit
97b1ac48dd
@ -40,6 +40,13 @@ import UIKit
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
public override var isEnabled: Bool {
|
||||||
|
didSet {
|
||||||
|
isUserInteractionEnabled = isEnabled
|
||||||
|
setNeedsDisplay()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Constraints
|
// MARK: - Constraints
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -71,7 +78,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Methods
|
// MARK: - Validation
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
/// The action performed when tapped.
|
/// The action performed when tapped.
|
||||||
@ -128,6 +135,7 @@ import UIKit
|
|||||||
|
|
||||||
self.delegateObject = delegateObject
|
self.delegateObject = delegateObject
|
||||||
isSelected = model.state
|
isSelected = model.state
|
||||||
|
isEnabled = model.enabled
|
||||||
RadioButtonSelectionHelper.setupForRadioButtonGroup(model, self, delegateObject: delegateObject)
|
RadioButtonSelectionHelper.setupForRadioButtonGroup(model, self, delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ open class RadioButtonModel: MoleculeModelProtocol, FormFieldProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Method
|
// MARK: - Validation
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
public func formFieldValue() -> AnyHashable? {
|
public func formFieldValue() -> AnyHashable? {
|
||||||
|
|||||||
@ -8,12 +8,13 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|
||||||
@objcMembers open class ListLeftVariableRadioButtonAndPaymentMethod: TableViewCell {
|
@objcMembers open class ListLeftVariableRadioButtonAndPaymentMethod: TableViewCell {
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
// MARK: - Outlets
|
// MARK: - Outlets
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
|
|
||||||
let radioButton = RadioButton(frame: .zero)
|
let radioButton = RadioButton()
|
||||||
let leftImage = MFLoadImageView(pinnedEdges: .all)
|
let leftImage = MFLoadImageView(pinnedEdges: .all)
|
||||||
let eyebrowHeadlineBodyLink = EyebrowHeadlineBodyLink()
|
let eyebrowHeadlineBodyLink = EyebrowHeadlineBodyLink()
|
||||||
var stack: Stack<StackModel>
|
var stack: Stack<StackModel>
|
||||||
@ -57,7 +58,7 @@ import UIKit
|
|||||||
// MARK: - Molecule
|
// MARK: - Molecule
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
|
||||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.set(with: model, delegateObject, additionalData)
|
super.set(with: model, delegateObject, additionalData)
|
||||||
guard let model = model as? ListLeftVariableRadioButtonAndPaymentMethodModel else { return}
|
guard let model = model as? ListLeftVariableRadioButtonAndPaymentMethodModel else { return}
|
||||||
radioButton.set(with: model.radioButton, delegateObject, additionalData)
|
radioButton.set(with: model.radioButton, delegateObject, additionalData)
|
||||||
@ -69,7 +70,10 @@ import UIKit
|
|||||||
return 90
|
return 90
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func didSelectCell(at index: IndexPath, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
public override func didSelectCell(at index: IndexPath, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
|
|
||||||
|
if radioButton.isEnabled {
|
||||||
radioButton.tapAction()
|
radioButton.tapAction()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|
||||||
@objcMembers open class Control: UIControl, MoleculeViewProtocol {
|
@objcMembers open class Control: UIControl, MoleculeViewProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user