<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTabViewController/removeTabViewItem(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTabViewController(im)removeTabViewItem:"
  },
  "title" : "removeTabViewItem(_:)"
}
-->

# removeTabViewItem(_:)

Removes the specified tab view item from the tab view controller.

```
func removeTabViewItem(_ tabViewItem: NSTabViewItem)
```

## Parameters

`tabViewItem`

The tab view item to remove. If this parameter is `nil` or the item does not belong to the tab view controller, this method throws an exception.

## Discussion

Use this method to remove a tab view item from the tab view interface. Removing the item removes the corresponding view controller from the tab view controller’s list of child view controllers. If the removed tab view item is currently selected, the tab view controller selects the next item (or the previous item if there is no next item). Removing the last tab view item sets the [`selectedTabViewItemIndex`](/documentation/AppKit/NSTabViewController/selectedTabViewItemIndex) property to `-1`.

---

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)