added nameforReuse
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
c87bbb3a78
commit
c9589e9b94
@ -97,6 +97,16 @@ open class TileContainer: VDS.TileContainer, VDSMoleculeViewProtocol{
|
|||||||
public static func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
public static func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||||
100
|
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
|
// MARK: - Overrides
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user