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

# selectTabViewItem(at:)

Selects the tab view item specified by `index`.

```
func selectTabViewItem(at index: Int)
```

## Parameters

`index`

The index of the tab item to selected.

## Discussion

The `index` parameter is base 0. If there is a delegate and the delegate supports it, sends the delegate the [`tabView(_:shouldSelect:)`](/documentation/AppKit/NSTabViewDelegate/tabView(_:shouldSelect:)) message.

## See Also

[`insertTabViewItem(_:at:)`](/documentation/AppKit/NSTabView/insertTabViewItem(_:at:))

Inserts the specified item into the tab view’s array of tab view items at the specified index.



---

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)