Instance Method


Asks for the custom transition layout to use when moving between the specified layouts.


- (UICollectionViewTransitionLayout *)collectionView:(UICollectionView *)collectionView transitionLayoutForOldLayout:(UICollectionViewLayout *)fromLayout newLayout:(UICollectionViewLayout *)toLayout;



The collection view whose layout object is changing.


The current layout of the collection view. This is the starting point for the transition.


The new layout for the collection view.

Return Value

The collection view transition layout object to use to perform the transition.


Implement this method if you want to return a custom UICollectionViewTransitionLayout object for use during the transition. A transition layout object lets you customize the behavior of cells and decoration views when transitioning from one layout to the next. Normally, transitioning between layouts causes items to animate directly from their current locations to their new locations. With a transition layout object, you can have objects follow a non linear path, use a different timing algorithm, or move according to incoming touch events.

If your delegate does not implement this method, the collection view creates a standard UICollectionViewTransitionLayout object and uses that object to manage the transition.

See Also

Handling Layout Changes

- collectionView:targetContentOffsetForProposedContentOffset:

Gives the delegate an opportunity to customize the content offset for layout changes and animated updates.

- collectionView:targetIndexPathForMoveFromItemAtIndexPath:toProposedIndexPath:

Asks the delegate for the index path to use when moving an item.