Instance Property


The default sizes to use for section headers.


var headerReferenceSize: CGSize { get set }


If the delegate does not implement the collectionView(_:layout:referenceSizeForHeaderInSection:) method, the flow layout object uses the default header sizes set in this property.

During layout, only the size that corresponds to the appropriate scrolling direction is used. For example, for the vertical scrolling direction, the layout object uses the height value returned by your method. (In that instance, the width of the header would be set to the width of the collection view.) If the size in the appropriate scrolling dimension is 0, no header is added.

The default size values are (0, 0).

See Also

Configuring the Supplementary Views

var footerReferenceSize: CGSize

The default sizes to use for section footers.