---
title: NSIndexSetIterator
framework: foundation
role: symbol
role_heading: Structure
path: foundation/nsindexsetiterator
---

# NSIndexSetIterator

An iterator suitable for enumerating the elements of an index set.

## Declaration

```swift
struct NSIndexSetIterator
```

## Overview

Overview You typically obtain an index set iterator by calling the makeIterator() function of an NSIndexSet instance.

## Relationships

### Conforms To

- [IteratorProtocol](swift/iteratorprotocol.md)

## See Also

### Iteration

- [NSEnumerator](foundation/nsenumerator.md)
- [NSFastEnumeration](foundation/nsfastenumeration.md)
- [NSFastEnumerationIterator](foundation/nsfastenumerationiterator.md)
- [NSEnumerationOptions](foundation/nsenumerationoptions.md)
- [NSSortOptions](foundation/nssortoptions.md)
