renamed func. changed location of action.
This commit is contained in:
parent
3d2137fc11
commit
32f85dfbf1
@ -80,8 +80,7 @@ import UIKit
|
||||
//--------------------------------------------------
|
||||
|
||||
open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||
|
||||
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject)
|
||||
callActionBlock(self)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -64,10 +64,10 @@ public typealias ButtonBlock = (Button) -> ()
|
||||
|
||||
public func addBlock( event: Event, _ buttonBlock: @escaping ButtonBlock) {
|
||||
self.buttonBlock = buttonBlock
|
||||
addTarget(self, action: #selector(callBlock(_:)), for: event)
|
||||
addTarget(self, action: #selector(callActionBlock(_:)), for: event)
|
||||
}
|
||||
|
||||
func callBlock(_ sender: Button) {
|
||||
func callActionBlock(_ sender: Button) {
|
||||
buttonBlock?(self)
|
||||
}
|
||||
|
||||
@ -90,6 +90,7 @@ public typealias ButtonBlock = (Button) -> ()
|
||||
extension Button: MVMCoreUIMoleculeViewProtocol {
|
||||
|
||||
public func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||
setWithActionMap(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||
self.json = json
|
||||
|
||||
guard let dictionary = json else { return }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user