---
title: headerReferenceSize
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicollectionviewflowlayout/headerreferencesize
---

# headerReferenceSize

The default sizes to use for section headers.

## Declaration

```swift
var headerReferenceSize: CGSize { get set }
```

## Discussion

Discussion 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 headers and footers

- [footerReferenceSize](uikit/uicollectionviewflowlayout/footerreferencesize.md)
- [Flow layout supplementary views](uikit/flow-layout-supplementary-views.md)
