kishikawakatsumi / IBPCollectionViewCompositionalLayout

Backport of UICollectionViewCompositionalLayout to earlier iOS 12
MIT License
1.55k stars 148 forks source link

Fix crash caused by miss match between cache keys #138

Open theScud opened 4 years ago

theScud commented 4 years ago

Problem: The crash caused by using a decorator view for sections with the library.

Route cause: cachedDecorationAttributes was using [NSIndexPath indexPathForItem:0 inSection:sectionIndex]as key when inserting into cache and [NSString stringWithFormat:@"%@-%zd-%d", decorationItem.elementKind, sectionIndex, 0] when retriving attributes from cache