开发者

UITableView Reload Data

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜