user1001011
user1001011

Reputation: 41

iphone tableview data dynamically

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

Answers (2)

utsabiem
utsabiem

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

Maulik
Maulik

Reputation: 19418

once you get selected value, reload the table by

[yourTableView reloadData];

Upvotes: 1

Related Questions