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

# takeSelectedTabViewItemFromSender(_:)

Sets the selected tab view item to the selected item obtained from the sender.

```
func takeSelectedTabViewItemFromSender(_ sender: Any?)
```

## Parameters

`sender`

Typically the object that sent the message.

## Discussion

If `sender` responds to the `indexOfSelectedItem` method, this method invokes that method and selects the tab view item 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)