<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPickerView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPickerView"
  },
  "title" : "UIPickerView"
}
-->

# UIPickerView

A view that uses a spinning-wheel or slot-machine metaphor to show one or more sets of values.

```
@MainActor class UIPickerView
```

## Overview

A picker view displays one or more wheels that the user manipulates to select items. Each wheel — known as a *component* — has a series of indexed rows representing the selectable items. Each row displays a string or view so that the user can identify the item on that row. Users select items by rotating the wheels to the desired values, which align with a selection indicator.

> Note:
> The ``doc://com.apple.uikit/documentation/UIKit/UIDatePicker`` class uses a custom subclass of ``doc://com.apple.uikit/documentation/UIKit/UIPickerView`` to display dates and times. To see an example, tap the add (”+”) button in the Alarm pane of the Clock app.

You provide the data to display in your picker view using a picker data source (an object that adopts the [`UIPickerViewDataSource`](/documentation/UIKit/UIPickerViewDataSource) protocol). Use your picker view delegate (an object that adopts the [`UIPickerViewDelegate`](/documentation/UIKit/UIPickerViewDelegate) protocol) to provide views for displaying your data and responding to user selections.

> Important:
> ``doc://com.apple.uikit/documentation/UIKit/UIPickerView`` and its descendants aren’t available when the user interface idiom is ``doc://com.apple.uikit/documentation/UIKit/UIUserInterfaceIdiom/mac``.

## Topics

### Providing the picker data

[`dataSource`](/documentation/UIKit/UIPickerView/dataSource)

The data source for the picker view.

[`UIPickerViewDataSource`](/documentation/UIKit/UIPickerViewDataSource)

The interface for a picker view’s data source.

### Customizing the picker behavior

[`delegate`](/documentation/UIKit/UIPickerView/delegate)

The delegate for the picker view.

[`UIPickerViewDelegate`](/documentation/UIKit/UIPickerViewDelegate)

The interface for a picker view’s delegate.

### Getting the dimensions of the picker view

[`numberOfComponents`](/documentation/UIKit/UIPickerView/numberOfComponents)

The number of components for the picker view.

[`numberOfRows(inComponent:)`](/documentation/UIKit/UIPickerView/numberOfRows(inComponent:))

Returns the number of rows for a component.

[`rowSize(forComponent:)`](/documentation/UIKit/UIPickerView/rowSize(forComponent:))

Returns the size of a row for a component.

### Reloading the picker view

[`reloadAllComponents()`](/documentation/UIKit/UIPickerView/reloadAllComponents())

Reloads all components of the picker view.

[`reloadComponent(_:)`](/documentation/UIKit/UIPickerView/reloadComponent(_:))

Reloads a particular component of the picker view.

### Selecting rows in the view picker

[`selectRow(_:inComponent:animated:)`](/documentation/UIKit/UIPickerView/selectRow(_:inComponent:animated:))

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

[`selectedRow(inComponent:)`](/documentation/UIKit/UIPickerView/selectedRow(inComponent:))

Returns the index of the selected row in a given component.

### Returning the view for a row and component

[`view(forRow:forComponent:)`](/documentation/UIKit/UIPickerView/view(forRow:forComponent:))

Returns the view used by the picker view for a given row and component.

### Managing the appearance of the picker view

[`showsSelectionIndicator`](/documentation/UIKit/UIPickerView/showsSelectionIndicator)

A Boolean value that determines whether the selection indicator is displayed.



---

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)
