From a556cfc96978965b0b40d407ed3ab35b1888f514 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Wed, 19 Apr 2017 11:23:10 -0700 Subject: [PATCH 1/2] Invalidate layout when collection view reused between IGListAdapters --- Source/IGListAdapter.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/IGListAdapter.m b/Source/IGListAdapter.m index 4fff8edbb..21b8cccf2 100644 --- a/Source/IGListAdapter.m +++ b/Source/IGListAdapter.m @@ -83,6 +83,7 @@ - (void)setCollectionView:(UICollectionView *)collectionView { _collectionView = collectionView; _collectionView.dataSource = self; + [_collectionView.collectionViewLayout invalidateLayout]; [self updateCollectionViewDelegate]; [self updateAfterPublicSettingsChange]; From afa292d638016db484581413971a5711a4ae55f7 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Wed, 19 Apr 2017 11:25:20 -0700 Subject: [PATCH 2/2] update changelog for #677 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a3fb21e1..a45af191d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,8 @@ This release closes the [3.0.0 milestone](https://github.com/Instagram/IGListKit - `IGListSectionType` protocol was removed and its methods were absorted into the `IGListSectionController` base class with default implementations. [Ryan Nystrom](https://github.com/rnystrom) (tbd) +- When setting the collection view on `IGListAdapter`, its layout is now properly invalidated. [Jesse Squires](https://github.com/jessesquires) [(#677)](https://github.com/Instagram/IGListKit/pull/677) + 2.1.0 -----