How do I create a queue on AFNetwork 2.0 and set a completion handler for when the added oppertations are finished?
currently I have this
ASINetworkQueue *queue = [[ASINetworkQueue alloc] init];
[queue setDelegate:self];
[queue setQueueDidFinishSelector:@selector(refeshInterface)];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[queue addOperation:request];
ASIFormDataRequest *request2 = [ASIFormDataRequest requestWithURL:url2];
[queue addOperation:request2];
[queue go]
But I need to convert it to AFNetwork. All the solutions I have found so far seem to use AFHTTPClient which doesn't exist in AFNetwork 2.0.
I am new to AFNetwork, so some examples would be greatly appreciated.
Thanks!
You need
method of AFURLConnectionOperation.
Please look at the following sample