<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPickerView/selectRow(_:inComponent:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPickerView(im)selectRow:inComponent:animated:"
  },
  "title" : "selectRow(_:inComponent:animated:)"
}
-->

# selectRow(_:inComponent:animated:)

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

```
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.

---

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)