All is title 🙂
I have this method :
[[NetworkManager sharedInstance] getContentFromUrl:url withId:@"json" onResultBlock:^(NSData *data, NSString *identifier) {
NSLog(@"done")
} onFailureBlock:^(NSError *error, NSString *identifier) {
NSLog(@"error");
}];
And in my app, i have one tableview with 50 cells.
When i run my app and that i move the tableview with my finger, the “done” message not appears. So, the next download does not start 🙁
But when i release my finger on the tableview, the “done” message appear…
information:
The method getContentFromUrl instanciates an object that is subclassed by NSOperation. In this object, i fetch the content with NSURLConnection initWithRequest:delegate:
Then, the object is add in NSOperationQueue.
Thx for answers 🙂
Your
NetworkManagerclass is scheduling asynchronousNSURLConnectionobjects on the main thread in the default run loop mode. While your finger is down, the run loop is put into theNSEventTrackingRunLoopModemode instead. This will pause the connection.NetworkManagershould be modified to schedule the connection explicitly usingNSRunLoopCommonModes. This includes the default mode and the event-tracking mode.