---
title: "setSelectedItemIndex(_:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfacepicker/setselecteditemindex(_:)"
---

# setSelectedItemIndex(_:)

Selects the specified item in the list.

## Declaration

```swift
func setSelectedItemIndex(_ itemIndex: Int)
```

## Parameters

- `itemIndex`: The index of the item to select. This index represents the index into the array of items you set using the doc://com.apple.watchkit/documentation/WatchKit/WKInterfacePicker/setItems(_:) method.

## Discussion

Discussion If the value in itemIndex exceeds the number of items in the array, the picker selects the last item. If itemIndex is negative, the picker selects the first item in the array.

## See Also

### Managing the Picker Contents

- [setItems(_:)](watchkit/wkinterfacepicker/setitems(_:).md)
- [WKPickerItem](watchkit/wkpickeritem.md)
- [setCoordinatedAnimations(_:)](watchkit/wkinterfacepicker/setcoordinatedanimations(_:).md)
