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

# selectedIndex

The current selection’s index.

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

## Discussion

The value of the property must be within the bounds of the [`pointsOfInterest`](/documentation/CarPlay/CPPointOfInterestTemplate/pointsOfInterest) array, or <doc://com.apple.documentation/documentation/Foundation/NSNotFound-4qp9h> to indicate no selection.

---

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)