I'm looking to override my UICollectionViewFlowLayout
to cause the cells to slide when changing positions due to an orientation change. What I have currently is 3 cells per row in portrait and 4 cells per row in landscape but the only animation I can get is the default fading in when I change orientations.
I've been looking at using performBatchUpdates
but I'm pretty sure that's not where I'll find the answer.
I've also been looking into the layoutAttributesForElementInRect
and layoutAttributesForItemAtIndexPath
which I think is where I'll find the answer. I'm not sure if I'll need to create a new attribute for the cells (previousCenter
maybe) and use that as the starting point for new animations or maybe use performBatchUpdates
using what should be the new frame as the value to change.
For the record all animation questions I've found have been about how to change animations for insertion and deletion of items which is not what I'm wanting to do.