2013-10-07 7 views

答えて

21

操作を手動でキャンセルできます。あなたは、操作キューからの操作を取得することができます。

AFHTTPRequestOperationManager *manager = // ... 
for (NSOperation *operation in manager.operationQueue.operations) { 
// here you can check if this is an operation you want to cancel 
    [operation cancel]; 
} 

// or just cancel all of them! 
[manager.operationQueue cancelAllOperations]; 

AFURLSessionManagerまた、あなたがNSURLSessionによりならoperationQueue性質を持っています。

+1

RequestOperation is iOS 6+&SessionManager is iOS 7+ afaik –

+0

どちらも操作のアイデアで動作します。使用しているオブジェクトからそれらを取得するだけです。 –

関連する問題