Instance Method

layoutAttributesForItemAtIndexPath:

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

Declaration

- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath;

Parameters

indexPath

The index path of the item.

Return Value

The layout attributes for the item or nil if no item exists at the specified path.

Discussion

Use this method to retrieve the layout information for a particular item. You should always use this method instead of querying the layout object directly.

See Also

Getting Layout Information

- layoutAttributesForSupplementaryElementOfKind:atIndexPath:

Returns the layout information for the specified supplementary view.