Returns the layout attribute objects for all items and views in the specified rectangle.
- macOS 10.11+
The rectangle (specified in the collection view’s coordinate system) containing the target views.
An array of layout attribute objects containing the layout information for the enclosed items and views.
Subclasses must override this method. In your implementation, return layout attributes for all items, supplementary views, and decoration views that intersect the specified rectangle.
For each element, always return a layout object of the appropriate type (item, supplementary, or decoration). The collection view differentiates between attributes for items, supplementary views, and decoration views and uses the differences to decide how to create and manage the corresponding views. Use the
layout methods to create new layout attribute objects.