IBAnimatable icon indicating copy to clipboard operation
IBAnimatable copied to clipboard

AnimatableCollectionView and AnimatableCollectionViewCell

Open gkye opened this issue 9 years ago • 5 comments

An AnimatableCollectionView and/or an AnimatableCollectionViewCell would be nice :+1:

gkye avatar Jan 26 '16 08:01 gkye

For basic features, it is straight forward like AnimatableTableView and AnimatableTableViewCell, For more complicated features like slide in all cells one by one, it may require to do something with UICollectionViewDelegateFlowLayout to customise the animation. Any ideas?

JakeLin avatar Jan 26 '16 22:01 JakeLin

A few interesting UICollectionView layout animations: AnimatedCollectionViewLayout

tbaranes avatar Feb 13 '17 12:02 tbaranes

@tbaranes those are like our transitions.

JakeLin avatar Feb 13 '17 12:02 JakeLin

Yeah, but they are collectionView transitions 😆 I don't know well the API, but we may be able to reuse the viewControllers animations for some cases.

tbaranes avatar Feb 13 '17 13:02 tbaranes

In our case, we conform to UIViewControllerAnimatedTransitioning and implement func animateTransition(using transitionContext: UIViewControllerContextTransitioning) . In collection trainsitons, we need to subclass UICollectionViewFlowLayout and override layoutAttributesForElements. All animations are based on attributes. We need to abstract how collection view attributes to transition fromVC, toVC. formView and toView. I don't think that's easy to do  😣 The design of UIKit doesn't consider to share animations to different scenarios. Even for transition and presentation animations, they are very similar but hard to share the code for similar effect 😥

JakeLin avatar Feb 13 '17 22:02 JakeLin