<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/removeValue(at:fromPropertyWithKey:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(im)removeValueAtIndex:fromPropertyWithKey:"
  },
  "title" : "removeValue(at:fromPropertyWithKey:)"
}
-->

# removeValue(at:fromPropertyWithKey:)

Removes the object at the specified index from the collection specified by the passed key.

```
func removeValue(at index: Int, fromPropertyWithKey key: String)
```

## Discussion

The method `removeFrom<Key>AtIndex:` is invoked if it exists. If no corresponding scripting-KVC-compliant method (`-removeFrom<Key>AtIndex:`) is found, this method invokes `-mutableArrayValueForKey:` and mutates the result.

> Note:
> Prior to OS X version 10.4, this method did not invoke `-mutableArrayValueForKey:`.

---

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)