M
M
Maxim Sugak2019-01-26 18:42:04
iOS
Maxim Sugak, 2019-01-26 18:42:04

How to parse JSON before application starts loading?

I can't figure out the next one.
There is a ViewController and an object lies on it, say tableView.
I'm fetching a list from the server that I need to reflect in this table.
But the problem is that the method that receives the JSON and parses it is called by the application AFTER all the table protocol methods (Sourse and Delegate) are called). Accordingly, nothing is loaded into the table, since there is nothing to load.
How to deal with the problem?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kyman, 2019-01-26
@Kyman

tableView.reloadData()
in the callback of the method that receives the data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question