Type Property

layoutAttributesClass

Returns the class to use for layout attribute objects

Declaration

@property(class, readonly) Class layoutAttributesClass;

Return Value

The class to use for layout attribute objects.

Discussion

Override this method if you define a custom NSCollectionViewLayoutAttributes subclass for managing layout-related attributes. In your implementation, return the class object for your custom subclass.

You can call this method as needed to create new layout objects. A typical usage of this method is as follows:

id attributes = [[[MyCustomLayout layoutAttributesClass] alloc] init];

See Also

Providing Layout Information

- prepareLayout

Prepares the layout object to begin laying out content.

collectionViewContentSize

The width and height of the collection view’s contents.

- layoutAttributesForElementsInRect:

Returns the layout attribute objects for all items and views in the specified rectangle.

- layoutAttributesForItemAtIndexPath:

Returns the layout attributes for the item at the specified index path.

- layoutAttributesForSupplementaryViewOfKind:atIndexPath:

Returns the layout attributes of the supplementary view at the specified location in your layout.

- layoutAttributesForDecorationViewOfKind:atIndexPath:

Returns the layout attributes of the decoration view at the specified location in your layout.

- layoutAttributesForDropTargetAtPoint:

Returns layout attributes for the drop target at the specified point.

- layoutAttributesForInterItemGapBeforeIndexPath:

Returns layout attributes for the inter-item gap at the specified location in your layout.

- targetContentOffsetForProposedContentOffset:

Returns the offset value to use after an animated layout update or change.

- targetContentOffsetForProposedContentOffset:withScrollingVelocity:

Returns the offset value to use for the collection view’s content at the end of scrolling.