views:

25

answers:

1

I don't want to display my table view cells until the data has been loaded from an external source. I want to show an activity indicator over the table background while the data is loading. I can get the indicator to show by adding it as a subview to tableView, but I can't figure out how to hide the rows until they are ready to be displayed.

This is all being handled in a UITableViewController. The table is displayed in a popover.

+1  A: 

Hello

You may have differents solutions.
Maybe the first one and the faster, saying to the uiTableView datasource there is no section. Then when your externals datas are loaded, reload the tableView with the sections and rows.

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

Other solution, hide the uiTableView and set your activity indicator on an other view. But you need to avoid UITableViewController to achieve this ^^

Maybe the first solution would be the faster ;-)

Vinzius
returning 0 sections until loaded works - thanks.
sol