updating handle action when server send response
This commit is contained in:
parent
adb4ac1893
commit
767ca5c58a
@ -7,15 +7,12 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|
||||||
open class ModalMoleculeListTemplate: MoleculeListTemplate {
|
open class ModalMoleculeListTemplate: MoleculeListTemplate {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
public var closeButton: Button?
|
public var closeButton: Button?
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Lifecycle
|
// MARK: - Lifecycle
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -23,8 +20,14 @@ open class ModalMoleculeListTemplate: MoleculeListTemplate {
|
|||||||
override open func handleNewData() {
|
override open func handleNewData() {
|
||||||
super.handleNewData()
|
super.handleNewData()
|
||||||
|
|
||||||
closeButton = MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: { _ in
|
closeButton = MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: { [weak self] _ in
|
||||||
MVMCoreNavigationHandler.shared()?.removeCurrentViewController()
|
if let self = self {
|
||||||
|
guard let actionMap = self.loadObject?.pageJSON?.optionalDictionaryWithChainOfKeysOrIndexes([KeyButtonMap,"CloseButton"]) else {
|
||||||
|
MVMCoreNavigationHandler.shared()?.removeCurrentViewController()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: nil, delegateObject: self.delegateObjectIVar)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user