A view that uses a spinning-wheel or slot-machine metaphor to show one or more sets of values.
- iOS 2.0+
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.
You provide the data to be displayed in your picker view using a picker data source—an object that adopts the
UIPicker protocol. Use your picker view delegate—an object that adopts the
UIPicker protocol—to provide views for displaying your data and responding to user selections.