开发者

UITableView Reload Data

开发者 https://www.devze.com 2022-12-31 18:48 出处:网络
I use UITableView to show the informations get for server. Create the connection in viewWillAppear: method:

I use UITableView to show the informations get for server. Create the connection in viewWillAppear: method:

- (void)viewWillAppear:(BOOL)animated {
//Create connection
}

And i put the received data into array : NSSArray *dataFromServer:

Then i want to show the data on each cell (some NSString object).

As the connection was release, i call [self.tableView reloadDa开发者_C百科ta] , but can't work.

So i'd like to know, how to make this?


The connection needs time to load data. So the correct is load the UI -> loading the data -> refresh the UI. So when the view was load, add the activityView is the good choice. And when the data finish loading, remove the activityView, and call [self.tableView reloadData];


The connection needs time to load data. So the correct is load the UI -> loading the data -> refresh the UI. So when the view was load, add the activityView is the good choice. And when the data finish loading, remove the activityView, and call [self.tableView reloadData];

0

精彩评论

暂无评论...
验证码 换一张
取 消