모든 요청을 취소하고 싶습니다. 모든 요청을 취소비동기 NSURLConnection 및 NSOperation - 취소
-(void)cancelAllRequests
{
NSLog(@"%@",self.queue.operations);
[self.queue cancelAllOperations];
[self.queue waitUntilAllOperationsAreFinished];
}
:
[NSURLConnection sendAsynchronousRequest:echo queue:self.queue completionHandler:^(NSURLResponse *respone, NSData *data, NSError *error){
내가 다음이 방법을 사용하십시오 여기에 내가 비동기 연결을 만드는거야 방법이다.
실제로 BOOL을 YES로 변경하는 것 외에는 아무 것도하지 않습니다.
그래서 어떻게 비동기 연결을 취소해야합니까?
몇 분 안에이 사실을 알리겠습니다. – leo