<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureIndexPicker/selectedIndex",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureIndexPicker(py)selectedIndex"
  },
  "title" : "selectedIndex"
}
-->

# selectedIndex

The currently selected index.

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

## Discussion

The default value is `0`. You can only set a value that’s greater than or equal to `0` and less than [`numberOfIndexes`](/documentation/AVFoundation/AVCaptureIndexPicker/numberOfIndexes).

> Important:
> Only modify the selected index from the same dispatch queue that you specified in the control’s ``doc://com.apple.avfoundation/documentation/AVFoundation/AVCaptureSlider/setActionQueue:action:`` method.

---

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)