objective c - iOS: Wait for asynchronous method before populating a tableview -


i'm getting data server need use metadata creating table view. problem data loads asynchronously flow of app. i'm sure simple fix, how can either pause flow of app until data has loaded server, or update table view data becomes available?

thanks!

first, make sure data source methods written correctly if there no data yet, table indeed empty. because data source methods called when table first appears, before have data.

then, when there is data, call reloaddata (on main thread!). same data source methods run again, time there data.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -