开发者

Refreshing table data that is retrieved dynamically from JSON

I am retrieving the Json data from an URL into a table view. The problem is that i couldnt replace the old data that is retrieved, with the new 开发者_开发百科data when i click another table cell. The new data is getting added to the last cell of the table cell while the old data is also getting displayed. What could be the problem...


You have to replace the data for the current cell with the new data then call the reloadData method on your tableview.

I mean you need to change the data in the array / datastore you pull from when rendering your cells in your delegate methods.

By replacing the code when the table view requests all the data & cells for rendering your delegate methods will pull the new data down and return an updated cell.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜