Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
- (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