Skip to content

Commit

Permalink
Invalidate layout when collection view reused between IGListAdapters
Browse files Browse the repository at this point in the history
Summary:
Closes #659
Closes #677

Differential Revision: D4915322

Pulled By: jessesquires

fbshipit-source-id: 2ae6ff4ee1726fe2395233d7d662c0b12956a746
  • Loading branch information
jessesquires authored and facebook-github-bot committed Apr 19, 2017
1 parent 04e6c1b commit 1453276
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,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
-----
Expand Down
1 change: 1 addition & 0 deletions Source/IGListAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ - (void)setCollectionView:(UICollectionView *)collectionView {

_collectionView = collectionView;
_collectionView.dataSource = self;
[_collectionView.collectionViewLayout invalidateLayout];

[self updateCollectionViewDelegate];
[self updateAfterPublicSettingsChange];
Expand Down

0 comments on commit 1453276

Please sign in to comment.