使用UIPickerView
时需要指定其datasource和delegate,并且实现UIPickerViewDelegate
的
1 | optional public func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? |
和UIPickerViewDataSource
的
1 | public func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int |