<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSArray/removeObserver(_:fromObjectsAt:forKeyPath:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSArray(im)removeObserver:fromObjectsAtIndexes:forKeyPath:"
  },
  "title" : "removeObserver(_:fromObjectsAt:forKeyPath:)"
}
-->

# removeObserver(_:fromObjectsAt:forKeyPath:)

Removes `anObserver` from all key value observer notifications associated with the specified `keyPath` relative to the array’s objects at `indexes`.

```
func removeObserver(_ observer: NSObject, fromObjectsAt indexes: IndexSet, forKeyPath keyPath: String)
```

## Parameters

`observer`

The observer.

`indexes`

The index set.

`keyPath`

The key path, relative to the array, to be observed.

## Discussion

This is not merely a convenience method; invoking this method is potentially much faster than repeatedly invoking <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/removeObserver(_:forKeyPath:)>.

---

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)