---
title: selectedIndex
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nspagecontroller/selectedindex
---

# selectedIndex

The currently selected object in the arranged objects array.

## Declaration

```swift
var selectedIndex: Int { get set }
```

## Discussion

Discussion To animate a transition to a new index, use the NSPageController class animator object. This property is key-value observing compliant.

## See Also

### Page Controller Items

- [arrangedObjects](appkit/nspagecontroller/arrangedobjects.md)
- [navigateForward(to:)](appkit/nspagecontroller/navigateforward(to:).md)
