---
title: "selectRow(_:inComponent:animated:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipickerview/selectrow(_:incomponent:animated:)"
---

# selectRow(_:inComponent:animated:)

Selects a row in a specified component of the picker view.

## Declaration

```swift
func selectRow(_ row: Int, inComponent component: Int, animated: Bool)
```

## Parameters

- `row`: A zero-indexed number identifying a row of component.
- `component`: A zero-indexed number identifying a component of the picker view.
- `animated`: doc://com.apple.documentation/documentation/Swift/true to animate the selection by spinning the wheel (component) to the new value; if you specify doc://com.apple.documentation/documentation/Swift/false, the new selection is shown immediately.

## See Also

### Selecting rows in the view picker

- [selectedRow(inComponent:)](uikit/uipickerview/selectedrow(incomponent:).md)
