【发布时间】:2012-10-04 03:59:26
【问题描述】:
这是我用来取消下载的代码。
NSArray *queueArray = [downloadQueue operations];
for (ASIHTTPRequest *request in queueArray) {
NSString *objid = [request.userInfo objectForKey:Column_objectid];
if ([objid isEqualToString:audioToDelete.objectId]) {
[request clearDelegatesAndCancel];
[request removeTemporaryDownloadFile];
...}}
但是在我打电话之后
[请求 clearDelegatesAndCancel]
downloadQueue.operations 或 downloadQueue.requestsCount 还是一样的计数(downloadQueue 是我的 ASINetworkQueue)
如何将其从队列中移除? 或者我怎样才能得到我的下载队列的正确操作计数?
【问题讨论】:
-
尽管队列数相同,但在
clearDelegatesAndCancel调用之后,请求是否实际被处理???
标签: iphone objective-c ios ipad asihttprequest