vendredi 6 juin 2014

dispatch_get_main_queue Depreciated in iOS 8


Vote count:

0




I very commonly write code following this pattern:



- (void)doLongTaskAsync:(CompletionBlock)completion
{
dispatch_async(backgroundQueue, ^{
// Do Long Running Calculation

dispatch_async(dispatch_get_main_queue(), ^{
completion();
});
});
}


If dispatch_get_main_queue is depreciated, what is the replacement for this style of code? Is NSOperationQueue now the only means to thread code?



asked 35 secs ago

Neal

2,904





Aucun commentaire:

Enregistrer un commentaire