Instagram / IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.
https://instagram.github.io/IGListKit/
MIT License
12.87k stars 1.54k forks source link

SectionController Animation #603

Closed vcepeda858 closed 7 years ago

vcepeda858 commented 7 years ago

Is it possible to animate sectionControllers as they initially load in. I've tried editing the frame of a section controller in listAdapter(_: willDisplay: cell: at:)with no luck. Also looked into subclassing IGListGridCollectionViewLayout to override initialLayoutAttributesForAppearingItem yet that only gets called upon insert and not the initial load or performUpdatesAnimated(_:completion:).

rnystrom commented 7 years ago

@vcepeda858 I think the only way to do an initial load animation would be to start with an empty ([]) objects array for your data source and then call adapter.performUpdate(animated: true) on it.

vcepeda858 commented 7 years ago

@rnystrom Thank you, thats a route I was going to head next. I was just hoping there was something out of the box from IGListKit. Thanks again.