1
所以我有一個批量要求其爲以下代碼:取消批處理請求在AFNetworking
[[AHClient sharedClient] enqueueBatchOfHTTPRequestOperationsWithRequests:requestArray progressBlock:^(NSUInteger numberOfCompletedOperations, NSUInteger totalNumberOfOperations) {
} completionBlock:^(NSArray * operations){
dispatch_async(dispatch_get_main_queue(), ^(void){
//update the UI
});
}];
我試圖通過保存的URL的路徑在陣列中取消該請求,並執行以下操作:
for (NSString * urlPath in self.currentRequestArray_){
[[AHClient sharedClient] cancelAllHTTPOperationsWithMethod:@"GET" path:urlPath];
}
但它似乎仍然去完成的塊,即:更新用戶界面。想法或建議?