Ios – Is -[UITableView reloadData] asynchronous or synchronous


When you call -reloadData on a table view instance, does it make all UITableViewDataSource calls async?
Thank you.

Best Solution

This method actually just removes all the UITableViewCell views from the table. The data source delegate methods are called when the table is repainted.

So, it's asynchronous.


Actually, some calls ARE synchronous. The number of sections & rows and row heights are updated immediately, so, for example contentSize is set correctly after the call. On the other hand, tableView:cellForRowAtIndex: is not called until the table is repainted.