1
我試圖用2個UIPickerViews製作一個簡單的應用程序,當我放入第二個時,它只包含與第一個相同的數據。我已經聲明瞭功能將數據插入到第一個:超過1個UIPickerView Swift
var typesOfData = ["KB","MB","GB"]
func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {
return 1
}
func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return typesOfData.count
}
func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String! {
return typesOfData[row]
}
,但我需要知道如何聲明這些功能的第二UIPickerView。