Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnimatableCollectionView and AnimatableCollectionViewCell #53

Open
gkye opened this issue Jan 26, 2016 · 5 comments
Open

AnimatableCollectionView and AnimatableCollectionViewCell #53

gkye opened this issue Jan 26, 2016 · 5 comments

Comments

@gkye
Copy link
Member

gkye commented Jan 26, 2016

An AnimatableCollectionView and/or an AnimatableCollectionViewCell would be nice 馃憤

@JakeLin
Copy link
Member

JakeLin commented Jan 26, 2016

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 JakeLin modified the milestones: 2.6, v4 Feb 13, 2016
@tbaranes tbaranes changed the title AnimatableCollectionView and AnimatableCollectionView AnimatableCollectionView and AnimatableCollectionViewCell May 8, 2016
@tbaranes
Copy link
Member

tbaranes commented Feb 13, 2017

A few interesting UICollectionView layout animations: AnimatedCollectionViewLayout

@JakeLin
Copy link
Member

JakeLin commented Feb 13, 2017

@tbaranes those are like our transitions.

@tbaranes
Copy link
Member

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.

@JakeLin
Copy link
Member

JakeLin commented Feb 13, 2017

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 馃槬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants