Link Search Menu Expand Document

PickerViewDataSource

Mediates between a PickerView object and your application’s data model for that picker view.

public protocol PickerViewDataSource: AnyObject 

Inheritance

AnyObject

Requirements

numberOfComponents(in:​)

Called by the picker view when it needs the number of components.

func numberOfComponents(in pickerView: PickerView) -> Int

pickerView(_:​numberOfRowsInComponent:​)

Called by the picker view when it needs the number of rows for a specified component.

func pickerView(_ pickerView: PickerView,
                  numberOfRowsInComponent component: Int) -> Int