I am starting multiple AFJSONRequestOperation in a for loop like this:
for(NSString *obj in collection)
operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
//NSLog(@"success");
}
failure:nil];
[operation start];
How can I determine that all of my operations has finished?
I guess the operations are added a to the operationQueuein AFHTTPClient but I am not sure. Eitherway I dont know how to access the instance of the AFHTTPClient being used.
Add the
AFJSONRequestOperationobjects in aNSMutableArray(I'm usingoperationsin this case) instead of starting each one, then use the method :