Removes disabled logic from Button because it won't be in the actionMap going forward
This commit is contained in:
parent
2c5e2286b1
commit
8f23dd391c
@ -29,13 +29,6 @@ public typealias ButtonBlock = (Button) -> Void
|
|||||||
self.titleLabel?.numberOfLines = 0
|
self.titleLabel?.numberOfLines = 0
|
||||||
self.titleLabel?.lineBreakMode = .byWordWrapping
|
self.titleLabel?.lineBreakMode = .byWordWrapping
|
||||||
|
|
||||||
if let actionMap = self.actionMap,
|
|
||||||
let disableButtonAsAny = actionMap[KeyDisableButton],
|
|
||||||
let isDisabled = disableButtonAsAny as? Bool {
|
|
||||||
|
|
||||||
isEnabled = !isDisabled
|
|
||||||
}
|
|
||||||
|
|
||||||
if let mVMCoreUIDelegateObject = delegateObject as? MVMCoreUIDelegateObject {
|
if let mVMCoreUIDelegateObject = delegateObject as? MVMCoreUIDelegateObject {
|
||||||
self.buttonDelegate = mVMCoreUIDelegateObject.buttonDelegate
|
self.buttonDelegate = mVMCoreUIDelegateObject.buttonDelegate
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,6 +123,12 @@ open class CaretButton: Button, MVMCoreUIMoleculeViewProtocol, MVMCoreUIViewCons
|
|||||||
setTitle(title, for: .normal)
|
setTitle(title, for: .normal)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let disableButtonAsAny = dictionary[KeyDisableButton],
|
||||||
|
let isDisabled = disableButtonAsAny as? Bool {
|
||||||
|
|
||||||
|
isEnabled = !isDisabled
|
||||||
|
}
|
||||||
|
|
||||||
if let backgroundColorHex = dictionary[KeyBackgroundColor] as? String {
|
if let backgroundColorHex = dictionary[KeyBackgroundColor] as? String {
|
||||||
backgroundColor = UIColor.mfGet(forHex: backgroundColorHex)
|
backgroundColor = UIColor.mfGet(forHex: backgroundColorHex)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user