7
AFHTTPClient
クラスのcancelAllHTTPOperationsWithMethod:
を使用して操作をキャンセルできました。操作をキャンセルする新しい方法は何ですか?AFnetworking 2.0とは何ですか?キャンセル操作に相当します
AFHTTPClient
クラスのcancelAllHTTPOperationsWithMethod:
を使用して操作をキャンセルできました。操作をキャンセルする新しい方法は何ですか?AFnetworking 2.0とは何ですか?キャンセル操作に相当します
操作を手動でキャンセルできます。あなたは、操作キューからの操作を取得することができます。
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
性質を持っています。
RequestOperation is iOS 6+&SessionManager is iOS 7+ afaik –
どちらも操作のアイデアで動作します。使用しているオブジェクトからそれらを取得するだけです。 –