Returns layout attributes for the inter-item gap at the specified location in your layout.
- macOS 10.11+
The index path of the item that follows the inter-item gap. For a gap that follows the last item in the section, set the item property to the total number of items in the section.
A layout attributes object containing the layout information to apply to the inter-item gap, or
nil if no attributes are available.
The default implementation of this method returns
nil. Subclasses can override this method to provide layout attributes for inter-item gaps. In your implementation, use the specified index path to compute the location of the gap in collection view’s content. If the gap represents a valid location, use the
layout class method of
NSCollection to create a new layout attributes object and set the
frame property to the rectangle you computed.