diff --git a/Sources/CollectionViewSlantedLayout.swift b/Sources/CollectionViewSlantedLayout.swift index 3796518..a8da570 100644 --- a/Sources/CollectionViewSlantedLayout.swift +++ b/Sources/CollectionViewSlantedLayout.swift @@ -289,5 +289,11 @@ extension CollectionViewSlantedLayout { override open func layoutAttributesForItem(at indexPath: IndexPath) -> CollectionViewSlantedLayoutAttributes? { return cachedAttributes[indexPath.item] } + + /// :nodoc: + override open func invalidateLayout() { + super.invalidateLayout() + self.cachedAttributes.removeAll() + } }