Skip to content

Instantly share code, notes, and snippets.

@champierre
Created December 17, 2010 07:29
Show Gist options
  • Save champierre/744616 to your computer and use it in GitHub Desktop.
Save champierre/744616 to your computer and use it in GitHub Desktop.
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (dispatch_queue_create != NULL) {
main_queue = dispatch_get_main_queue();
timeline_queue = dispatch_queue_create("com.ey-office.gcd-sample.timeline", NULL);
image_queue = dispatch_queue_create("com.ey-office.gcd-sample.image", NULL);
dispatch_async(timeline_queue, ^{
[self getPublicTimeline];
dispatch_async(main_queue, ^{
[self.tableView reloadData];
});
});
} else {
[self getPublicTimeline];
[self.tableView reloadData];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment