diff --git a/CHANGELOG.md b/CHANGELOG.md index fc4d96bac..3a16d1807 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 b615be4bb..a9c8f4b76 100644 --- a/Source/IGListCollectionViewLayout.mm +++ b/Source/IGListCollectionViewLayout.mm @@ -289,7 +289,7 @@ - (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSInde 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;