<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewDelegateFlowLayout/collectionView(_:layout:minimumInteritemSpacingForSectionAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UICollectionViewDelegateFlowLayout(im)collectionView:layout:minimumInteritemSpacingForSectionAtIndex:"
  },
  "title" : "collectionView(_:layout:minimumInteritemSpacingForSectionAt:)"
}
-->

# collectionView(_:layout:minimumInteritemSpacingForSectionAt:)

Asks the delegate for the spacing between successive items in the rows or columns of a section.

```
optional func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat
```

## Parameters

`collectionView`

The collection view object displaying the flow layout.

`collectionViewLayout`

The layout object requesting the information.

`section`

The index number of the section whose inter-item spacing is needed.

## Return Value

The minimum space (measured in points) to apply between successive items in the lines of a section.

## Discussion

If you do not implement this method, the flow layout uses the value in its [`minimumInteritemSpacing`](/documentation/UIKit/UICollectionViewFlowLayout/minimumInteritemSpacing) property to set the space between items instead. Your implementation of this method can return a fixed value or return different spacing values for each section.

For a vertically scrolling grid, this value represents the minimum spacing between items in the same row. For a horizontally scrolling grid, this value represents the minimum spacing between items in the same column. This spacing is used to compute how many items can fit in a single line, but after the number of items is determined, the actual spacing may possibly be adjusted upward.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)