diff --git a/CHANGELOG.md b/CHANGELOG.md index fc4d96ba..3a16d180 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ The changelog for `IGListKit`. Also see the [releases](https://github.com/instag - Fixed footer is sticky when `stickyHeader` is `true` [aelam](https://github.com/aelam) [(#1094)](https://github.com/Instagram/IGListKit/pull/1094) +- Updated IGListCollectionViewLayout to rely on layoutAttributesClass instead of vanilla `UICollectionViewLayoutAttributes` [Cole Potrocky](https://github.com/SirensOfTitan) [#1135](https://github.com/instagram/IGListKit/pull/1135) + - `-[IGListSectionController didSelectItemAtIndex:]` is now called when a `scrollViewDelegate` or `collectionViewDelegate` is set. [Ryan Nystrom](https://github.com/rnystrom) [(#1108)](https://github.com/Instagram/IGListKit/pull/1108) 3.2.0 diff --git a/Source/IGListCollectionViewLayout.mm b/Source/IGListCollectionViewLayout.mm index b615be4b..a9c8f4b7 100644 --- a/Source/IGListCollectionViewLayout.mm +++ b/Source/IGListCollectionViewLayout.mm @@ -289,7 +289,7 @@ static void adjustZIndexForAttributes(UICollectionViewLayoutAttributes *attribut return nil; } - attributes = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath]; + attributes = [[[self class] layoutAttributesClass] layoutAttributesForCellWithIndexPath:indexPath]; attributes.frame = _sectionData[indexPath.section].itemBounds[indexPath.item]; adjustZIndexForAttributes(attributes); _attributesCache[indexPath] = attributes;