Farlanki.

UIPickerView

字数统计: 49阅读时长: 1 min
2016/02/24 Share

使用UIPickerView时需要指定其datasource和delegate,并且实现UIPickerViewDelegate

1
optional public func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String?

UIPickerViewDataSource

1
2
3
public func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int

public func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int
CATALOG