---
title: ForEachSubviewCollection
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/foreachsubviewcollection
---

# ForEachSubviewCollection

A collection which allows a view to be treated as a collection of its subviews in a for each loop.

## Declaration

```swift
struct ForEachSubviewCollection<Content> where Content : View
```

## Relationships

### Conforms To

- [BidirectionalCollection](swift/bidirectionalcollection.md)
- [Collection](swift/collection.md)
- [RandomAccessCollection](swift/randomaccesscollection.md)
- [Sequence](swift/sequence.md)

## See Also

### Iterating over dynamic data

- [ForEach](swiftui/foreach.md)
- [ForEachSectionCollection](swiftui/foreachsectioncollection.md)
- [DynamicViewContent](swiftui/dynamicviewcontent.md)
