A view that uses a spinning-wheel or slot-machine metaphor to show one or more sets of values.
Declaration
class UIPickerView : UIView
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 be displayed 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.
developer.apple.com/documentation/uikit/uipickerview
Apple Developer Documentation
developer.apple.com
'Programming > Swift' 카테고리의 다른 글
Protocols (0) | 2020.11.06 |
---|---|
When to Use Inheritance (0) | 2020.11.06 |
Class: URLSession (0) | 2020.10.29 |
UICollectionViewFlowLayout (0) | 2020.10.29 |
UITableViewDelegate (0) | 2020.10.29 |