The Wayback Machine - https://web.archive.org/web/20200713185600/https://github.com/SDWebImage/SDWebImage/issues/2984
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UICollectionView Compositional Layout + Diffable Datasource Support #2984

Open
akun1 opened this issue Apr 15, 2020 · 2 comments
Open

UICollectionView Compositional Layout + Diffable Datasource Support #2984

akun1 opened this issue Apr 15, 2020 · 2 comments
Labels
bug

Comments

@akun1
Copy link

@akun1 akun1 commented Apr 15, 2020

New Issue Checklist

Issue Info

Info Value
Platform Name iOS
Platform Version 13.0+
SDWebImage Version Latest as of 4/15/2020
Integration Method Cocoapods
Xcode Version Xcode 11
Repro rate all the time (100%)
Repro with our demo prj Unsure
Demo project link Unable to provide

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

  1. Create UICollectionView with compo layout + diffable data source. Make layout similar to App Store's layout.

  2. Load image URLs into first row of cells (they should have image views inside of them). Use sd_setImage func.

  3. 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.

  4. Make sure all cells have same class, but different layouts.

@dreampiggy dreampiggy added the bug label Apr 16, 2020
@dreampiggy
Copy link
Contributor

@dreampiggy dreampiggy commented Apr 16, 2020

Create UICollectionView with compo layout + diffable data source. Make layout similar to App Store's layout.

@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.

@stale
Copy link

@stale stale bot commented Jun 15, 2020

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.

@stale stale bot added the stale label Jun 15, 2020
@dreampiggy dreampiggy removed the stale label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.