Instance Method

applyLayoutAttributes:

Applies the specified layout attributes to the view.

Declaration

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes;

Parameters

layoutAttributes

The layout attributes to apply.

Discussion

The default implementation of this method does nothing.

If the layout object supports custom layout attributes, you can use this method to apply those attributes to the view. In such a case, the layoutAttributes parameter should contain an instance of a subclass of UICollectionViewLayoutAttributes. You do not need to override this method to support the standard layout attributes of the UICollectionViewLayoutAttributes class. The collection view applies those attributes automatically.

See Also

Managing Layout Changes

- preferredLayoutAttributesFittingAttributes:

Gives the cell a chance to modify the attributes provided by the layout object.

- willTransitionFromLayout:toLayout:

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

- didTransitionFromLayout:toLayout:

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