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?) {
|
open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||||
|
callActionBlock(self)
|
||||||
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -64,10 +64,10 @@ public typealias ButtonBlock = (Button) -> ()
|
|||||||
|
|
||||||
public func addBlock( event: Event, _ buttonBlock: @escaping ButtonBlock) {
|
public func addBlock( event: Event, _ buttonBlock: @escaping ButtonBlock) {
|
||||||
self.buttonBlock = 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)
|
buttonBlock?(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,6 +90,7 @@ public typealias ButtonBlock = (Button) -> ()
|
|||||||
extension Button: MVMCoreUIMoleculeViewProtocol {
|
extension Button: MVMCoreUIMoleculeViewProtocol {
|
||||||
|
|
||||||
public func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
public func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
|
setWithActionMap(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||||
self.json = json
|
self.json = json
|
||||||
|
|
||||||
guard let dictionary = json else { return }
|
guard let dictionary = json else { return }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user