I'm having problems figuring out a way to determine when UICollectionView is/has finished animating.
I currently have a UICollectionView that animates between two subclassed flow layouts using setCollectionViewLayout:animated:
The animation looks great, however, I'm having some undesired behaviour if a user selects a cell during the animation.
I'm looking at ignoring the cell 'selection' by returning NO
through the UICollectionViewDelegate
method collectionView:shouldSelectItemAtIndexPath:
- however - I cannot figure out a reliable test to see if the collection view is currently animating.
Any ideas?
Try checking that there are no animation keys.BOOL isAnimating = myView.layer.animationKeys.count > 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With