Instance Property

changedIndexes

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

Declaration

var changedIndexes: IndexSet? { get }

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.

If the hasIncrementalChanges property’s value is false, this property’s value is nil.

See Also

Getting Change Information

var hasIncrementalChanges: Bool

A Boolean value that indicates whether changes to the fetch result can be described incrementally.

var removedIndexes: IndexSet?

The indexes from which objects have been removed from the fetch result.

var removedObjects: [ObjectType]

The items that have been removed from the fetch result.

var insertedIndexes: IndexSet?

The indexes where new objects have been inserted in the fetch result.

var insertedObjects: [ObjectType]

The new items that have been inserted in the fetch result.

var changedObjects: [ObjectType]

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

var hasMoves: Bool

A Boolean value that indicates whether objects have been rearranged in the fetch result.

func enumerateMoves((Int, Int) -> Void)

Runs the specified block for each case where an object has moved from one index to another in the fetch result.