Created
January 20, 2012 17:39
-
-
Save shepting/1648615 to your computer and use it in GitHub Desktop.
Nested Dispatch Async Calls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ | |
Company *company = [self createCompanyForIndexPath:indexPath]; | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
[self createNewViewWithCompany:company]; | |
}); | |
}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment