Skeletonview: Does not work with new UICollectionView Compositional Layout

Created on 4 Sep 2020  路  3Comments  路  Source: Juanpe/SkeletonView

鈿狅笍 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

help wanted 馃挕 enhancement

All 3 comments

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

What can we do in the meantime with composition layouts?

Your problem doesn't seem related to compositional layout, but with diffable data source, take a look at #279.
https://github.com/Juanpe/SkeletonView/issues/279#issuecomment-666167980 helped me to make it work.

Was this page helpful?
0 / 5 - 0 ratings