---
title: sectionInset
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicollectionviewflowlayout/sectioninset
---

# sectionInset

The margins used to lay out content in a section.

## Declaration

```swift
var sectionInset: UIEdgeInsets { get set }
```

## Discussion

Discussion If the delegate object does not implement the collectionView(_:layout:insetForSectionAt:) method, the flow layout uses the value in this property to set the margins for each section. Section insets reflect the spacing at the outer edges of the section. The margins affect the initial position of the header view, the minimum space on either side of each line of items, and the distance from the last line to the footer view. The margin insets do not affect the size of the header and footer views in the non scrolling direction. The default edge insets are all set to 0.

## See Also

### Configuring item spacing

- [minimumLineSpacing](uikit/uicollectionviewflowlayout/minimumlinespacing.md)
- [minimumInteritemSpacing](uikit/uicollectionviewflowlayout/minimuminteritemspacing.md)
- [itemSize](uikit/uicollectionviewflowlayout/itemsize.md)
- [estimatedItemSize](uikit/uicollectionviewflowlayout/estimateditemsize.md)
- [automaticSize](uikit/uicollectionviewflowlayout/automaticsize.md)
- [sectionInsetReference](uikit/uicollectionviewflowlayout/sectioninsetreference-swift.property.md)
- [UICollectionViewFlowLayout.SectionInsetReference](uikit/uicollectionviewflowlayout/sectioninsetreference-swift.enum.md)
