I have a UICollectionView with expandable cells (just paste the following code into an empty project (xcode - new - uikit app with storyboard), it will work):
https://gist.github.com/smocer/e8c4bb3c5465c1a01bcf6aa33e0fd9dc
And I have a problem when cell expand and collectionview layout update animations are out of sync (the cell expands immediately, while other cells move smoothly):
It's worth noting that collapse animation is actually in sync with UICollectionView animation for some reason.
The question is, how can I sync them without using hacks or workarounds? I mean, I can add some animations to the Cell's layer with Core Animation, but, I have to tune the duration value manually since I don't know what time it takes for UICollectionView to animate its items.
And if it's not possible, what is the best way to do it?