---
title: makeIterator()
framework: realitykit
role: symbol
role_heading: Instance Method
path: realitykit/scene/anchorcollection/makeiterator()
---

# makeIterator()

Returns an iterator over the elements of the collection.

## Declaration

```swift
@MainActor @preconcurrency func makeIterator() -> Scene.AnchorCollection.Iterator
```

## See Also

### Iterating over the collection

- [Scene.AnchorCollection.Iterator](realitykit/scene/anchorcollection/iterator.md)
- [Scene.AnchorCollection.Element](realitykit/scene/anchorcollection/element.md)
