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

# takeSelectedIndexFrom(_:)

Navigates to the selected index, which is taken from the sender.

```
@IBAction func takeSelectedIndexFrom(_ sender: Any?)
```

## Parameters

`sender`

The control that invoked the action.

## Discussion

When invoked, this method causes the page controller’s view to display the object specified by the value taken from the `sender` control.

This method is animated and invokes the delegate’s [`pageControllerWillStartLiveTransition(_:)`](/documentation/AppKit/NSPageControllerDelegate/pageControllerWillStartLiveTransition(_:)) and [`pageControllerDidEndLiveTransition(_:)`](/documentation/AppKit/NSPageControllerDelegate/pageControllerDidEndLiveTransition(_:)) methods.

## See Also

[`navigateForward(to:)`](/documentation/AppKit/NSPageController/navigateForward(to:))

Navigates to the specific object.



---

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)