I have a UICollectionView in UISplitViewController with a custom UICollectionViewLayout which implements:
prepareLayoutto store the attributes with right frames (based on orientation);collectionViewContentSizeto return the right collection view size based on the orientationlayoutAttributesForItemAtIndexPathjust returns the stored attributeslayoutAttributesForElementsInRectcheck for the intersections
My layout looks like this in portrait mand landscape mode:

Now, the problem is that when I change the orientation of the screen, I use this function to trigger the layout update:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
[headlinesCollectionView performBatchUpdates:nil completion:nil];
}
and this changes instantly the cell frame size to the new one; however the cell position get animated. Before trying this I used invalidateLayout, which does even a worse job since it doesn't animate either the size or the position.
Any idea on how I could make this work? The cell should get resized AND move whilst the animation occurs.