Hello,
First of all, apologize for my level of English language.
I have setup a view collection with a search bar and filters. The layout being made with your package.
When i perform a reload on this with this method : self.collectionView.collectionViewLayout.invalidateLayout().
I obtain this error on the debugger :
[CollectionView] Layout attributes <CollectionViewSlantedLayout.CollectionViewSlantedLayoutAttributes: 0x7ff1035113c0> index path: (<NSIndexPath: 0xbcd26c36f94746f0> {length = 2, path = 0 - 3}); frame = (0 603; 414 275); zIndex = 3; were received from the layout <CollectionViewSlantedLayout.CollectionViewSlantedLayout: 0x7ff1035148a0> but are not valid for the data source counts. Attributes will be ignored.
After research i solved it by adding this method to your class CollectionViewSlantedLayout.swift
The method to add is :
override open func invalidateLayout() {
super.invalidateLayout()
self.cachedAttributes.removeAll()
}
I can put this code and make a pull request if you want and if you are ok.