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?) {
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject)
callActionBlock(self)
}
}

View File

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