You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The skeletonView won't hide when the .hideSkeleton() function runs for a UICollectionView that has orthogonal scrolling behavior set at the Compositional Layout.
Code snippets and some more explanation are provided at the Attachment section below.
What type of issue is this? (place an x in one of the [ ])
bug
enhancement (feature request)
question
documentation related
discussion
Requirements (place an x in each of the [ ])
I've read and understood the Contributing guidelines and have done my best effort to follow them.
I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
SkeletonView Environment:
SkeletonView version: 1.30.4 Xcode version: 14.3 (14E222b) Swift version: Swift 5
Steps to reproduce:
Setup UICollectionView with UICollectionViewCompositionalLayout and orthogonalScrollingBehavior.
Set isSkeletonable for collection view and it's cells to true.
Run collectionView.showAnimatedGradientSkeleton().
Run collectionView.hideSkeleton(reloadDataAfter: true, transition: .crossDissolve(0.25)) when data load is finished.
Expected result:
Animated skeleton hides
Actual result:
Animated skeleton are still showing
Attachments:
Here's the code when i set the UICollectionView's Compositional Layout:
I've tried to comment out the section.orthogonalScrollingBehavior = .continuous part and the animated skeleton views are hides as expected when the .hideSkeleton() function runs.
// Set the UICollectionView
private func setupCollectionView() {
collectionView.delegate = self
collectionView.dataSource = self
collectionView.alwaysBounceVertical = false
collectionView.collectionViewLayout = setCollectionCompositionalLayout()
collectionView.register(SliderCell.self, forCellWithReuseIdentifier: "SliderCell")
collectionView.showAnimatedGradientSkeleton()
}
// Creates UICollectionView Compositional Layout
private func setCollectionCompositionalLayout() -> UICollectionViewLayout {
let item_size = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .fractionalHeight(1))
let item = NSCollectionLayoutItem(layoutSize: item_size)
let group_size = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .fractionalHeight(1))
let group = NSCollectionLayoutGroup.horizontal(layoutSize: group_size, subitems: [item])
let section = NSCollectionLayoutSection(group: group)
section.orthogonalScrollingBehavior = .continuous
return UICollectionViewCompositionalLayout(section: section)
}
The text was updated successfully, but these errors were encountered:
@noorbhatia i don't really know if this workaround is affecting any performance or not, but right now the only way i could make it works is by modifying the function to set up the collectionView layout at my above code to setCollectionCompositionalLayout(shouldUseOrthogonalScroll: Bool).
Basically i need to first create a compositional layout without the orthogonal scrolling, do the data load, and after i run the .hideSkeleton() function, i run the setCollectionCompositionalLayout() function again but this time i set the shouldUseOrthogonalScroll to true, resetting the collectionView's layout and run collectionView.reloadData()
Description
The skeletonView won't hide when the .hideSkeleton() function runs for a UICollectionView that has orthogonal scrolling behavior set at the Compositional Layout.
Code snippets and some more explanation are provided at the Attachment section below.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
SkeletonView Environment:
SkeletonView version: 1.30.4
Xcode version: 14.3 (14E222b)
Swift version: Swift 5
Steps to reproduce:
UICollectionView
withUICollectionViewCompositionalLayout
andorthogonalScrollingBehavior
.isSkeletonable
for collection view and it's cells to true.collectionView.showAnimatedGradientSkeleton()
.collectionView.hideSkeleton(reloadDataAfter: true, transition: .crossDissolve(0.25))
when data load is finished.Expected result:
Animated skeleton hides
Actual result:
Animated skeleton are still showing
Attachments:
Here's the code when i set the UICollectionView's Compositional Layout:
I've tried to comment out the
section.orthogonalScrollingBehavior = .continuous
part and the animated skeleton views are hides as expected when the .hideSkeleton() function runs.The text was updated successfully, but these errors were encountered: