Say I have an app with the following method strucutre :
[self method1];
[self method2];
And that method 1 contains a dispatch queue such as :
[exportSession exportAsynchronouslyWithCompletionHandler:^{
switch (exportSession.status) {
case AVAssetExportSessionStatusFailed:{
NSLog (@"FAIL");
break;
}
case AVAssetExportSessionStatusCompleted: {
NSLog (@"SUCCESS");
}
};
}];
I want to only proceed to execute [method2] once the dispatch queue in method1 has completed. What is the best way to achieve this ?
Put the call to
-method2inside the completion handler block.