<!--
{
  "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:minimumLineSpacingForSectionAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UICollectionViewDelegateFlowLayout(im)collectionView:layout:minimumLineSpacingForSectionAtIndex:"
  },
  "title" : "collectionView(_:layout:minimumLineSpacingForSectionAt:)"
}
-->

# collectionView(_:layout:minimumLineSpacingForSectionAt:)

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

```
optional func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt 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 line spacing is needed.

## Return Value

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

## Discussion

If you do not implement this method, the flow layout uses the value in its [`minimumLineSpacing`](/documentation/UIKit/UICollectionViewFlowLayout/minimumLineSpacing) property to set the space between lines 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 successive rows. For a horizontally scrolling grid, this value represents the minimum spacing between successive columns. This spacing is not applied to the space between the header and the first line or between the last line and the footer.

---

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)