Friday, July 25, 2014

Execute code in background

// Fetch legend details task in background
                 dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
                 dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
                     
                     // Perform task here

                 });

No comments:

Post a Comment