开发者

How to Refresh a list view in background?

I want to refresh a list view in a controller while it is in backgroun开发者_运维技巧d. As i want to update the array of that list.

any ideas on how to do this.

Thnx a lot in advance


I think what you meant was that your ViewController was pushed back in the stack and from the top View controller you want to update the array and reload list? If this assumption is correct this is what you can do

  1. Define the array [containing data for list] as property and synthesize it for accessing outside
  2. Define the list UITableView as property (synthesize) as well to access it in subclass.
  3. Store the reference of this controller in the child controller for access
  4. Update the array using the stored reference
  5. Reload the tableView via [self.parentController.tableView reloadData];


Read about NSOperation and NSOperationQueue. NSThread also might be useful.
Both will give you ideas how to do some work in background.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜