diff --git a/Sources/IBPCollectionViewCompositionalLayout/IBPUICollectionViewCompositionalLayout.m b/Sources/IBPCollectionViewCompositionalLayout/IBPUICollectionViewCompositionalLayout.m index 12667d1..d7093f3 100644 --- a/Sources/IBPCollectionViewCompositionalLayout/IBPUICollectionViewCompositionalLayout.m +++ b/Sources/IBPCollectionViewCompositionalLayout/IBPUICollectionViewCompositionalLayout.m @@ -425,8 +425,7 @@ - (void)prepareLayout { layoutAttributes.zIndex = decorationItem.zIndex; layoutAttributes.frame = frame; - NSIndexPath *indexPath = [NSIndexPath indexPathForItem:0 inSection:sectionIndex]; - cachedDecorationAttributes[indexPath] = layoutAttributes; + cachedDecorationAttributes[[NSString stringWithFormat:@"%@-%zd-%d", decorationItem.elementKind, sectionIndex, 0]] = layoutAttributes; } CGRect insetsContentFrame = contentFrame;