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

Does not work with new UICollectionView Compositional Layout #321

Open
normand1 opened this issue Sep 4, 2020 · 9 comments
Open

Does not work with new UICollectionView Compositional Layout #321

normand1 opened this issue Sep 4, 2020 · 9 comments

Comments

@normand1
Copy link

normand1 commented Sep 4, 2020

⚠️ Please fill out this template when filing an issue.

🙏🏼 Please check if it already exists other issue related with yours.

What did you do?

Implemented a UICollectionView using the new Compositional Layout feature.

Then added this to viewDidLoad()

DispatchQueue.main.async {
            self.collectionView.showSkeleton()
        }

What did you expect to happen?

Expected to see the skeleton view applied to the UICollectionView

What happened instead?

I assume that since UICollectionView implementations that use Compositional Layout use diffable datasources instead of implementing the CollecitonView data source the skeleton view was not applied to my collectionview cells.

Steps to reproduce the behavior

Implement a UICollectionView with Compositional Layout and try applying the SkeletonView

SkeletonView Environment

SkeletonView version: SkeletonView (1.8.8)
Xcode version: 11.7
Swift version: 5.2

@Juanpe
Copy link
Owner

Juanpe commented Sep 7, 2020

Hi @normand1, I need to check it, but I think we should make some changes to make SkeletonView compatible with the new Compositional layout system

@james-ff
Copy link

What can we do in the meantime with composition layouts?

@diogot
Copy link
Contributor

diogot commented Dec 14, 2020

Your problem doesn't seem related to compositional layout, but with diffable data source, take a look at #279.
#279 (comment) helped me to make it work.

@jDomenech
Copy link

Hello, I just tried to implement it in a collection view using compositional layout and the skeleton seems to work fine (it appears properly) but the method cellForItemAt of the collectionView is never called; so after calling hideSkeleton() the cells never get updated (already tried using reloadData()).

@JacksonJang
Copy link
Contributor

@jDomenech
Hello, I'm Jackson.
I'd like to help you with your problem.

So give me your source code example!

@jDomenech
Copy link

jDomenech commented Jan 21, 2022 via email

@JacksonJang
Copy link
Contributor

@jDomenech
Thank you for the answer

It's hard for me to check error section
So, Please upload your example project to github repository and then share for us

@jDomenech
Copy link

jDomenech commented Jan 21, 2022 via email

@JacksonJang
Copy link
Contributor

I'm glad it's resolved !
Have a good day
@jDomenech

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants