From 2e6bb6fbabd37c713dbea2f36d34e23c35d902a6 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 14 Sep 2022 11:53:51 -0500 Subject: [PATCH] added prepare for reuse Signed-off-by: Matt Bruce --- VDS/Classes/CollectionViewCell.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/VDS/Classes/CollectionViewCell.swift b/VDS/Classes/CollectionViewCell.swift index b3e5a13c..536053b1 100644 --- a/VDS/Classes/CollectionViewCell.swift +++ b/VDS/Classes/CollectionViewCell.swift @@ -87,4 +87,11 @@ open class CollectionViewCell: UICo modelHandler.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true modelHandler.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true } + + open override func prepareForReuse() { + super.prepareForReuse() + if let handler = modelHandler as? Resettable { + handler.reset() + } + } }