Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUICollectionView Compositional Layout + Diffable Datasource Support #2984
Labels
Comments
@akun1 ...Can we have a little example for this ? You don't need to create an App, use mock data and mock server is OK, just construct the usage case is enough for debugging. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


New Issue Checklist
Issue Info
Issue Description and Steps
Explanation:
We have a UICollectionView using compositional layout + diffable data source. Each cell has an imageView inside and some labels.
When loading the image view, we use sd_setImage() to set the image URL. When we do this with a standard index collection view, everything works.
However, when we use sd_setImage() with compositional layout, images will load in random cells and flicker when cells go in and out of view.
Steps to Repro
Create UICollectionView with compo layout + diffable data source. Make layout similar to App Store's layout.
Load image URLs into first row of cells (they should have image views inside of them). Use sd_setImage func.
When you run them and the images load, you'll see multiple cells in different rows and sections load images that are not supposed to be there.
Make sure all cells have same class, but different layouts.