---
title: UIPickerView
framework: uikit
role: symbol
role_heading: Class
path: uikit/uipickerview
---

# UIPickerView

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

## Declaration

```swift
@MainActor class UIPickerView
```

## Mentioned in

About app development with UIKit

## Overview

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 UIDatePicker class uses a custom subclass of 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 protocol). Use your picker view delegate (an object that adopts the UIPickerViewDelegate protocol) to provide views for displaying your data and responding to user selections. important: UIPickerView and its descendants aren’t available when the user interface idiom is UIUserInterfaceIdiom.mac.

## Topics

### Providing the picker data

- [dataSource](uikit/uipickerview/datasource.md)
- [UIPickerViewDataSource](uikit/uipickerviewdatasource.md)

### Customizing the picker behavior

- [delegate](uikit/uipickerview/delegate.md)
- [UIPickerViewDelegate](uikit/uipickerviewdelegate.md)

### Getting the dimensions of the picker view

- [numberOfComponents](uikit/uipickerview/numberofcomponents.md)
- [numberOfRows(inComponent:)](uikit/uipickerview/numberofrows(incomponent:).md)
- [rowSize(forComponent:)](uikit/uipickerview/rowsize(forcomponent:).md)

### Reloading the picker view

- [reloadAllComponents()](uikit/uipickerview/reloadallcomponents().md)
- [reloadComponent(_:)](uikit/uipickerview/reloadcomponent(_:).md)

### Selecting rows in the view picker

- [selectRow(_:inComponent:animated:)](uikit/uipickerview/selectrow(_:incomponent:animated:).md)
- [selectedRow(inComponent:)](uikit/uipickerview/selectedrow(incomponent:).md)

### Returning the view for a row and component

- [view(forRow:forComponent:)](uikit/uipickerview/view(forrow:forcomponent:).md)

### Managing the appearance of the picker view

- [showsSelectionIndicator](uikit/uipickerview/showsselectionindicator.md)

## Relationships

### Inherits From

- [UIView](uikit/uiview.md)

### Conforms To

- [CALayerDelegate](quartzcore/calayerdelegate.md)
- [CLBodyIdentifiable](corelocation/clbodyidentifiable.md)
- [CMBodyIdentifiable](coremotion/cmbodyidentifiable.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [UIAccessibilityIdentification](uikit/uiaccessibilityidentification.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearance](uikit/uiappearance.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UICoordinateSpace](uikit/uicoordinatespace.md)
- [UIDynamicItem](uikit/uidynamicitem.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIFocusItem](uikit/uifocusitem.md)
- [UIFocusItemContainer](uikit/uifocusitemcontainer.md)
- [UILargeContentViewerItem](uikit/uilargecontentvieweritem.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIPopoverPresentationControllerSourceItem](uikit/uipopoverpresentationcontrollersourceitem.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)

## See Also

### Content views

- [UIActivityIndicatorView](uikit/uiactivityindicatorview.md)
- [UICalendarView](uikit/uicalendarview.md)
- [UIContentUnavailableView](uikit/uicontentunavailableview.md)
- [UIImageView](uikit/uiimageview.md)
- [UIProgressView](uikit/uiprogressview.md)
