renamed func. changed location of action.

This commit is contained in:
Kevin G Christiano 2020-01-13 16:30:29 -05:00
parent 3d2137fc11
commit 32f85dfbf1
2 changed files with 4 additions and 4 deletions

View File

@ -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)
} }
} }

View File

@ -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 }