I have a UIPickerView where the numberOfComponentsInPickerView=4.
But how do I populate each component, as they have different value ranges?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
by implementing
– pickerView:numberOfRowsInComponent:of the pickers datasource.and the pickerView’s delegate
either
– pickerView:titleForRow:forComponent:or– pickerView:viewForRow:forComponent:reusingView:If the components change, you can call
[aPickerView reloadComponent:<numberOfComponent>]or
[aPickerView reloadAllComponents]if even the number of components changes.The dataSource and the viewDelegate documentation.
edit
I just put my very first iPhone program on GitHub, that is a coffee configuration based on a 3 or 4 component picker: You can select amount, kind and one option for every coffee. Except for Latte — there you can choose two different options. You will find it in this repository as “M18Coffee”. As I said: my very first program — might be rough.