Answer the question
In order to leave comments, you need to log in
Why is the array not being passed to Picker?
Why is the array not being passed to picker?
// Array of values in picker
let numeralSystems = ["16 NS","10 NS", "8 NS", "2 NS" ]
func numberOfComponents(in pickerView: UIPickerView) -> Int {
return 1
}
func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
return numeralSystems[row]
}
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return numeralSystems.count
}
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
fromLabel.text = numeralSystems[row]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question