Instance Property

dataSource

The data source for the picker view.

Declaration

weak var dataSource: UIPickerViewDataSource? { get set }

Discussion

The data source must adopt the UIPickerViewDataSource protocol and implement the required methods to return the number of components and the number of rows in each component.

See Also

Providing the Picker Data

protocol UIPickerViewDataSource

The UIPickerViewDataSource protocol must be adopted by an object that mediates between a UIPickerView object and your application’s data model for that picker view. The data source provides the picker view with the number of components, and the number of rows in each component, for displaying the picker view data. Both methods in this protocol are required.