---
title: "removeItem(withObjectValue:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscombobox/removeitem(withobjectvalue:)"
---

# removeItem(withObjectValue:)

Removes all occurrences of the given object from the receiver’s internal item list.

## Declaration

```swift
func removeItem(withObjectValue object: Any)
```

## Parameters

- `object`: The object to remove from the internal item list. Objects are considered equal if they have the same id or if isEqual: returns doc://com.apple.documentation/documentation/Swift/true.

## Discussion

Discussion This method logs a warning if the usesDataSource property is true.

## See Also

### Related Documentation

- [indexOfItem(withObjectValue:)](appkit/nscombobox/indexofitem(withobjectvalue:).md)

### Configuring the Combo Box Items

- [addItems(withObjectValues:)](appkit/nscombobox/additems(withobjectvalues:).md)
- [addItem(withObjectValue:)](appkit/nscombobox/additem(withobjectvalue:).md)
- [insertItem(withObjectValue:at:)](appkit/nscombobox/insertitem(withobjectvalue:at:).md)
- [objectValues](appkit/nscombobox/objectvalues.md)
- [removeAllItems()](appkit/nscombobox/removeallitems().md)
- [removeItem(at:)](appkit/nscombobox/removeitem(at:).md)
- [numberOfItems](appkit/nscombobox/numberofitems.md)
