---
title: changedIndexes
framework: photos
role: symbol
role_heading: Instance Property
path: photos/phfetchresultchangedetails/changedindexes
---

# changedIndexes

The indexes of objects in the fetch result whose content or metadata have been updated.

## Declaration

```swift
var changedIndexes: IndexSet? { get }
```

## Discussion

Discussion Use this index set to update elements in a collection view or similar user interface that displays the contents of the fetch result. These indexes are relative to the original fetch result (the fetchResultBeforeChanges property) after you’ve applied the changes described by the removedIndexes and insertedIndexes properties; when updating your app’s interface, apply changes after removals and insertions and before moves. warning: Don’t map changedIndexes directly to UICollectionView item indices in batch updates. Use these indices to reconfigure the corresponding cells after performBatchUpdates(_:completion:). UICollectionView and UITableView expect the changedIndexes to be in the before state, while PhotoKit provides them in the after state, resulting in a crash if your app performs insertions and deletions at the same time as the changes. If the hasIncrementalChanges property’s value is false, this property’s value is nil.

## See Also

### Getting Change Information

- [hasIncrementalChanges](photos/phfetchresultchangedetails/hasincrementalchanges.md)
- [removedIndexes](photos/phfetchresultchangedetails/removedindexes.md)
- [removedObjects](photos/phfetchresultchangedetails/removedobjects.md)
- [insertedIndexes](photos/phfetchresultchangedetails/insertedindexes.md)
- [insertedObjects](photos/phfetchresultchangedetails/insertedobjects.md)
- [changedObjects](photos/phfetchresultchangedetails/changedobjects.md)
- [hasMoves](photos/phfetchresultchangedetails/hasmoves.md)
- [enumerateMoves(_:)](photos/phfetchresultchangedetails/enumeratemoves(_:).md)
