From 9c07a13dd693cec238056fcbc4bb22841b305023 Mon Sep 17 00:00:00 2001 From: Cole Potrocky Date: Tue, 20 Mar 2018 17:31:18 -0400 Subject: [PATCH 1/3] Updated IGListCollectionViewLayout to rely on layoutAttributesClass instead of just allocating a vanilla UICollectionViewLayoutAttributes --- Source/IGListCollectionViewLayout.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/IGListCollectionViewLayout.mm b/Source/IGListCollectionViewLayout.mm index 8ee577a5f..e459d6a81 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; From 97aff15a878755a151ac99be2347dff4aa07125f Mon Sep 17 00:00:00 2001 From: Cole Potrocky Date: Tue, 20 Mar 2018 17:38:06 -0400 Subject: [PATCH 2/3] Added pull request to changelog. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47fcfed9e..ae1f7599d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ The changelog for `IGListKit`. Also see the [releases](https://github.com/instag - 5x improvement to diffing performance when result is only inserts or deletes. [Ryan Nystrom](https://github.com/rnystrom) [(tbd)](tbd) +- Updated IGListCollectionViewLayout to rely on layoutAttributesClass instead of vanilla `UICollectionViewLayoutAttributes` [Cole Potrocky](https://github.com/SirensOfTitan) [#1135](https://github.com/instagram/IGListKit/pull/1135) + ### Fixes - Copy objects when retrieving from datasource to prevent modification of models in binding section controller. [Kashish Goel](https://github.com/kashishgoel) [(#1109)](https://github.com/Instagram/IGListKit/pull/1109) From 86d542004e65af1fa8f2babbbb6e28faac8f29c5 Mon Sep 17 00:00:00 2001 From: Cole Potrocky Date: Tue, 20 Mar 2018 17:40:46 -0400 Subject: [PATCH 3/3] Whoops, put pull request under fixes. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae1f7599d..510b36181 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,13 +11,13 @@ The changelog for `IGListKit`. Also see the [releases](https://github.com/instag - 5x improvement to diffing performance when result is only inserts or deletes. [Ryan Nystrom](https://github.com/rnystrom) [(tbd)](tbd) -- Updated IGListCollectionViewLayout to rely on layoutAttributesClass instead of vanilla `UICollectionViewLayoutAttributes` [Cole Potrocky](https://github.com/SirensOfTitan) [#1135](https://github.com/instagram/IGListKit/pull/1135) - ### Fixes - Copy objects when retrieving from datasource to prevent modification of models in binding section controller. [Kashish Goel](https://github.com/kashishgoel) [(#1109)](https://github.com/Instagram/IGListKit/pull/1109) - 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) + 3.2.0 -----