I m using NSoperationQueue for load song from server.
This code execute when click on diff-diff buttons.
NSOperationQueue *queue;
NSInvocationOperation *operation = [[NSInvocationOperation alloc]
initWithTarget:self selector:@selector(loadImage)object:nil];
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
[queue addOperation:operation];
Problem is that when user click ie.Rama.aac then loading continue in this duration if he click krishna.aac then this process also goes into that queue.and conflicting is there.
user is finally requesting for krishna but in result first download rama.aac then krishna.aac.
I m using [queue cancelAllOperations] but it not works.
How i solve this?