0
我在SOAP服務中有一個查詢,它返回一個DataSource,DataSource每行有兩列,如何使用Swift 2.3將這些列帶到UIPickerView中?如何將NSMutableArray傳遞給UIPickerView?
我使用此代碼來傳遞數據源:
func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
print(DataSource[row])
if component == 0 {
return DataSource[row][IdPessoa] as? String
} else {
return DataSource[row][Empresa] as? String
}
}
你是怎麼做到的? – Adarkas2302