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
Problems appearing cells before the animation starts. #12
Comments
If you're animating from outside the view I recommend you hide the views then reload the data and then apply the animation. self?.collectionView.refreshControl?.endRefreshing()
let offset = UIScreen.main.bounds.width
self?.collectionView.prepareViews()
self?.collectionView.reloadData()
let fromAnimation = AnimationType.from(direction: .left, offset: offset)
let animationInterval = 0.1
self?.collectionView.animateViews(animations: [fromAnimation], initialAlpha: 1, finalAlpha: 1, delay: 0, duration: 0.4, animationInterval: animationInterval, completion: {
}) |
Hello @marcosgriselli ! Sorry for late response. I tried to do so it did not help me. This happens only during the first loading screen, in the future it works. Also I did so, but it did not help me
|
@alexanderkhitev prepareViews will not work if there are no cells to prepare 😕. You'll have to do some workaround. The shortest path to get it could be self?.collectionView.alpha = 0
self?.collectionView.reloadData()
self?.collectionView.prepareViews(initialAlpha: 0)
self?.collectionView.alpha = 1 Or setting te cell alpha to 0 on |
@marcosgriselli Yes I tried doing the same method only with isHidden and it also works, thanks! |
Hello! Thanks for the wonderful framework! I ran into the problem that UICollectionView cells appear before the animation starts, at this point the cells are loading photos and the user names are already visible. Please tell me how can this be avoided?
https://monosnap.com/file/MgYyNwEbBqeMdyI4jedYBPMf0uIKOQ
The text was updated successfully, but these errors were encountered: