How to use one UIPickerView for multiple textfields in one view?

Viewed 13052

I have 8 textfields in one view. I want to populate each using a pickerview. Can I have 1 pickerview which will display different list of items from different arrays for different textfields?

Can someone explain how do I do it programmatically with a sample code?

Also how can I hide the pickerview when the view loads and it should be displayed only when I click on a textfield with its corresponding data list? It should disappear when I select the data and reappear when I click on a different textfield with its corresponding data list and so on.

I am new to xcode. Any help will be much appreciated. Thank you.

4 Answers
Related