Pio*_*sik 7 objective-c ios afnetworking-2
我曾经能够cancelAllHTTPOperationsWithMethod:在AFHTTPClient课堂上使用取消操作.取消操作的新方法是什么?
Mar*_*bri 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];
Run Code Online (Sandbox Code Playgroud)
AFURLSessionManageroperationQueue如果你更喜欢,也有一个属性NSURLSession.
| 归档时间: |
|
| 查看次数: |
5503 次 |
| 最近记录: |