mvm_core_ui/MVMCoreUI/Molecules/MoleculeViewProtocol.swift
Suresh, Kamlesh 205c83c097 intial draft
2019-10-28 14:47:42 -04:00

39 lines
1.4 KiB
Swift

//
// MVMCoreUIMoleculeViewProtocol1.swift
// MVMCoreUI
//
// Created by Suresh, Kamlesh on 10/24/19.
// Copyright © 2019 Verizon Wireless. All rights reserved.
//
import Foundation
import UIKit
import MVMCore.MVMCoreViewProtocol
//@import MVMCoreUI.Swift;
@objc public protocol MoleculeViewProtocol: MVMCoreViewProtocol {
/// Sets up the ui based on the json
@objc func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?)
/// Called after init to provide an early setter for any molecule specific logic
@objc optional func setAsMolecule()
/// Resets to default state before set with json is called again.
@objc optional func reset()
/// For the molecule list to load more efficiently.
@objc optional static func estimatedHeight(forRow json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat
/// Allows the molecule to set its name for reuse. Default could be moleculeName.
@objc optional static func name(forReuse molecule: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?) -> String?
/// Can return the required modules
@objc optional static func requiredModules(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]?
}