mvm_core_ui/MVMCoreUI/Molecules/MoleculeViewProtocol.swift
Pfeil, Scott Robert 347ebbed8c typo fixes
2019-11-07 10:05:17 -05:00

38 lines
1.3 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
@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]?
}