added nameforReuse

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-04-24 17:15:11 -05:00
parent c87bbb3a78
commit c9589e9b94

View File

@ -97,6 +97,16 @@ open class TileContainer: VDS.TileContainer, VDSMoleculeViewProtocol{
public static func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
100
}
/// Allows the molecule to set its name for reuse. Default could be moleculeName. Mainly used for list or collections.
public static func nameForReuse(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
// This will aggregate names of molecules to make an id.
guard let model = model as? ButtonGroupModel else {
return "tileContainer<>"
}
return "tileContainer<\(model.moleculeName)>"
}
//--------------------------------------------------
// MARK: - Overrides