Carl Henretti
Carl Henretti

Reputation: 477

Save and load table view from JSON file?

I'm sorry this questions won't perfectly to conform to what stack overflow wants questions to look like, but I have a general questions about a programming technique.

In my case, the user can manually add and edit his table view cells. After he's finished editing it, is it possible to "save" the resulting table view into a JSON file? I want it to upload then to firebase, so that another user can download it, read the data from the JSON file and have the same view controller in front of him.

How is that possible? Is that possible? And if not, which "technique" would you use for doing it?

Upvotes: 2

Views: 252

Answers (2)

Lou Franco
Lou Franco

Reputation: 89172

The data in a UITableView is backed by a UITableViewDataSource. The class you write to implement this just provides cells on demand from some data. It could also provide JSON.

So, it's not the table that does this, but instead the class you implement to fill the table with data.

Upvotes: 1

Related Questions