Take the 2-minute tour ×

I am working on project with picker view. I have two components in it. I want to have the second component contents loaded based the selection made in the first view. Can anyone please help me with this.


share|improve this question
What have you tried? Show your code and explain what exactly you can't do? –  Vladimir Mar 3 '11 at 15:08
add comment

1 Answer

up vote 0 down vote accepted

Your pickerView:numberOfRowsInComponent: and pickerView:titleForRow:forComponent: when called for the second component will have to check the value of the first component to determine what to return.

pickerView:didSelectRow:inComponent: when called for the first component will have to call reloadComponent: on the picker to tell it to reload the data for the second component.

share|improve this answer
Could you please explain little more in detail. –  pa12 Mar 4 '11 at 2:17
Thanks it worked. I had a condition error. –  pa12 Mar 4 '11 at 2:41
add comment

Your Answer


