<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSComboBoxCell/insertItem(withObjectValue:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSComboBoxCell(im)insertItemWithObjectValue:atIndex:"
  },
  "title" : "insertItem(withObjectValue:at:)"
}
-->

# insertItem(withObjectValue:at:)

Inserts an object at the specified location in the internal item list.

```
func insertItem(withObjectValue object: Any, at index: Int)
```

## Parameters

`object`

The object to add to the combo box’s internal item list.

`index`

The index at which to add the specified object.  The previous item at `index`—along with all following items—is shifted down one slot to make room.

## Discussion

This method logs a warning if [`usesDataSource`](/documentation/AppKit/NSComboBoxCell/usesDataSource) is <doc://com.apple.documentation/documentation/Swift/true>.

---

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)