<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSOrderedCollectionChange",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSOrderedCollectionChange"
  },
  "title" : "NSOrderedCollectionChange"
}
-->

# NSOrderedCollectionChange

An object that represents an indexed change within an ordered collection.

```
class NSOrderedCollectionChange
```

## Overview

An ordered collection change represents changes by adding, removing, or moving objects within an ordered collection. Changes with an associated index indicate a move within the collection.

## Topics

### Creating a Change

[`-  initWithObject:type:index:`](/documentation/Foundation/NSOrderedCollectionChange/init(object:type:index:))

Creates a change object that represents inserting or removing an object from an ordered collection at a specific index.

[`-  initWithObject:type:index:associatedIndex:`](/documentation/Foundation/NSOrderedCollectionChange/init(object:type:index:associatedIndex:))

Creates a change object that represents inserting, removing, or moving an object from an ordered collection at a specific index.

[`+  changeWithObject:type:index:`](/documentation/Foundation/NSOrderedCollectionChange/changeWithObject:type:index:)

Creates an change object that represents inserting or removing an object from an ordered collection at a specific index.

[`+  changeWithObject:type:index:associatedIndex:`](/documentation/Foundation/NSOrderedCollectionChange/changeWithObject:type:index:associatedIndex:)

Creates an change object that represents inserting or removing an object from an ordered collection at a specific index, matched with an associated location that infers a move within the collection.

### Accessing the Change

[`changeType`](/documentation/Foundation/NSOrderedCollectionChange/changeType)

The type of change.

[`index`](/documentation/Foundation/NSOrderedCollectionChange/index)

The index location of the change.

[`object`](/documentation/Foundation/NSOrderedCollectionChange/object)

An object the change inserts or removes.

[`associatedIndex`](/documentation/Foundation/NSOrderedCollectionChange/associatedIndex)

When this property is set to a value other than [`NSNotFound`](/documentation/Foundation/NSNotFound-9t5v2), the receiver is one half of a move, and this value is the index of the change’s counterpart of the opposite type in the diff.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)