Just in appdelegates, applicationDidBecomeActive. I create and start a thread, this thread waits for asynchronous loading and then saves the data:
- (void)applicationDidBecomeActive:(UIApplication *)application { // begins Asynchronous download data (1 second): [wsDataComponents updatePreparedData:NO]; NSThread* downloadThread = [[NSThread alloc] initWithTarget:self selector: @selector (waitingFirstConnection) object:nil]; [downloadThread start]; }
then
-(void)waitingFirstConnection{ while (waitingFirstDownload) { // Do nothing ... Waiting a asynchronous download, Observers tell me when // finish first donwload } // begins Synchronous download, and save data (20 secons) [wsDataComponents updatePreparedData:YES]; // Maybe is this the problem ?? I change a label in main view controller [menuViewController.labelBadgeVideo setText:@"123 videos"]; // Nothig else, finish and this thread is destroyed }
In the Organizer console, when done, I get the following warning:
CoreAnimation: warning, deleted thread with uncommitted CATransaction;
source share