McDuffman
McDuffman

Reputation: 1

Refresh JSON table in iOS 5

I have a table view, which is populated by a single tableviewcell that gets repeated, but filled with detail from a JSON file on the web. SO I have, on startup, 15 cells, each with its own JSON detail view. I'm wondering how I implement a refresh system, with a button preferably, that gets the app to re-download the JSON file. That way, if I make a change in the database, it can then be updated manually. Thanks.

Upvotes: 0

Views: 474

Answers (1)

Rens Verhage
Rens Verhage

Reputation: 5857

So you already have a function to download the JSON and use it to render your table?

Create a button that calls that function, and after it returns reload the UITableView by calling reloadData on the UITableView.

Upvotes: 1

Related Questions