I’m using ASIHTTPRequest to make a queue request, But i was wondering if there is a way to know When the queue has finished With all the request here is part of my code
for (int i=0; i< [result count]; i++)
{
Reportes *temp = [result objectAtIndex:i];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setTag:0];
[request setDelegate:self];
[request setPostValue:[[NSUserDefaults standardUserDefaults] stringForKey:USERNAME] forKey:POST_USUARIO];
[request setPostValue:[KeychainWrapper keychainStringFromMatchingIdentifier:PIN_SAVED] forKey:POST_CLAVE];
[request setPostValue:POST_IDSISTEMA_VALUE forKey:POST_IDSISTEMA];
[request setPostValue:[self getMacAddress] forKey:POST_MAC];
[request setPostValue:[[temp toNSDictionary] JSONRepresentation] forKey:@"value"];
[[self queue] addOperation:request];
}
You can implement the following method
queueFinishedis the one that gets called after all the requests have finished. In order for this to work you have to callwhen you initialize the queue