Amira Elsayed Ismail
Amira Elsayed Ismail

Reputation: 9414

iOS UITableView reloadData show empty screen

I am loading data from server in iOS and then add them to table data source, the problem that sometimes the screen is empty until I touch or the scroll the screen and then every thing is appear, can any one tell me what is the problem and how can I slove it ?

Upvotes: 1

Views: 268

Answers (1)

meda
meda

Reputation: 45500

After loading data from your server , always reload on the main queue:

dispatch_async(dispatch_get_main_queue(), ^{
    [self.tableView reloadData];
});

Post some code if you need further help.

Upvotes: 3

Related Questions