0
AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:url];
[manager.operationQueue cancelAllOperations];

As this is code is not working. Please help me with an optimize solution.

Bhuvan Bhatt
  • 3,276
  • 2
  • 18
  • 23
  • Of course that is not working, you are create an new instance of the operation manager. Just call `cancelAllOperations` on the instance of the operation manager which is performing the request or cancel the request it self. – rckoenes May 12 '15 at 09:34
  • Thanks. But I am not using AFHTTPRequestOperation. And cancelAllOperation cant call by manager. So how can I create instance of AFHTTPRequestOperation while using AFHTTPRequestOperationManager – Bhuvan Bhatt May 12 '15 at 09:47

0 Answers0