I have a situation where I need to make two HTTP GET requests and handle their results only after both are finished. I have a completion handler on each individual network r
Source: How do I write dispatch_after GCD in Swift 3?
You can use dispatch_group for that.
For example (ObjC code):
dispatch_group_t group = dispatch_group_create();
//startOperation1
dispatch_group_enter(group);
//finishOpeartion1
dispatch_group_leave(group);
//startOperation2
dispatch_group_enter(group);
//finishOpeartion2
dispatch_group_leave(group);
//Handle both operations completion
dispatch_group_notify(group, dispatch_get_main_queue(), ^{
//code here
});