【发布时间】:2012-09-19 10:11:41
【问题描述】:
我想取消所有请求。以下是我创建异步连接的方式:
[NSURLConnection sendAsynchronousRequest:echo queue:self.queue completionHandler:^(NSURLResponse *respone, NSData *data, NSError *error){
然后我用这个方法:
-(void)cancelAllRequests
{
NSLog(@"%@",self.queue.operations);
[self.queue cancelAllOperations];
[self.queue waitUntilAllOperationsAreFinished];
}
取消所有请求。
除了将 BOOL 更改为 YES 之外,实际上什么都不做。
那么我应该如何取消异步连接?
【问题讨论】:
标签: iphone ios xcode cocoa-touch ipad