<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SectionCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17SectionCollectionV"
  },
  "title" : "SectionCollection"
}
-->

# SectionCollection

An opaque collection representing the sections of view.

```
struct SectionCollection
```

## Overview

Sections are constructed lazily, on demand, so access only as much
of this collection as is necessary to create the resulting content.

You can get access to a view’s [`SectionCollection`](/documentation/SwiftUI/SectionCollection) by using the
`Group/init(sectionsOf:transform:)` initializer.

Any content of the given view which is not explicitly specified as a section
is grouped with its sibling content to form implicit sections, meaning the
minimum number of sections in a `SectionCollection` is one.

## Relationships

### Conforms To

[`BidirectionalCollection`](/documentation/Swift/BidirectionalCollection)

[`Collection`](/documentation/Swift/Collection)

[`RandomAccessCollection`](/documentation/Swift/RandomAccessCollection)

[`Sequence`](/documentation/Swift/Sequence)

---

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)