시뮬레이터에 인터넷 연결을 끊었다가 다시 연결하면connectionDidFinishLoading도 didFailWithError도 호출되지 않습니다.
connectionInProgress = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES];
가 호출됩니다. initWithRequest에 대한 하나의 호출은 connectionDidFinishLoading:
과 didFailWithError:
을 호출하지 않습니다.
루프를 호출하여 다음 결과를 얻습니다 (연결이 끊어진 경우).
DidFailWithError: Fetch failed: The Internet connection appears to be offline.
몇 초 후 다음 호출 (인터넷이 다시 연결됨).
DidFailWithError: Fetch failed: A server with the specified hostname could not be found.
그리고 다음 번에 두 콜백 중 어느 것도 호출되지 않습니다.
조금 바꿔서 사용할 수 있습니까? 나는 그 문제에 대해 확신하지 못한다. –