Instance Method

didTransitionFromLayout:toLayout:

Tells the element that the layout object of the collection view changed.

Declaration

- (void)didTransitionFromLayout:(NSCollectionViewLayout *)oldLayout toLayout:(NSCollectionViewLayout *)newLayout;

Parameters

oldLayout

The collection view’s previous layout object.

newLayout

The current layout object associated with the collection view.

Discussion

The default implementation of this method does nothing. Subclasses can override it and use it to finalize any behaviors associated with the change in layouts.

Special Considerations

In OS X 10.11, this method is never called.

See Also

Managing Layout Changes

- preferredLayoutAttributesFittingAttributes:

Asks your element if it wants to modify any layout attributes before they are applied.

- applyLayoutAttributes:

Applies the specified layout attributes to the element.

- willTransitionFromLayout:toLayout:

Tells the element that the layout object of the collection view is about to change.