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 operationQueue
in AFHTTPClient but I am not sure. Eitherway I dont know how to access the instance of the AFHTTPClient being used.
Add the
AFJSONRequestOperation
objects in aNSMutableArray
(I'm usingoperations
in this case) instead of starting each one, then use the method :