Skip to content

Instantly share code, notes, and snippets.

@jwhitehorn
Created March 29, 2013 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwhitehorn/5273500 to your computer and use it in GitHub Desktop.
Save jwhitehorn/5273500 to your computer and use it in GitHub Desktop.
- (void)viewDidLoad{
[super viewDidLoad];
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue, ^{
//go fetch some data from the Iternet or DB here...
//data received!
dispatch_async(dispatch_get_main_queue(), ^{
//update UI
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment