Reputation: 41
I have a UIPickerView in my application.
Also there is a table view. Based on the value I select in picker my table values should change.
I am getting values from response. how can I dynamically populate the table? Thanks in advance.
Upvotes: 0
Views: 188
Reputation: 920
What I understand is, you select a value from picker , based on which you call some web-service. There you get some response and show that result in tableview. So the best way is, get the response data from webservice(the data you want to show in table) and store it in some dictionary. in cellForRowAtIndexPath:
, show the value in cell from this dictionary. The reloadData
will help you to reload the tableView
once you got the response.
Upvotes: 1
Reputation: 19418
once you get selected value, reload the table by
[yourTableView reloadData];
Upvotes: 1