调用无论connectionDidFinishLoading:也不didFailWithError:被调用
connectionInProgress = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES];
当我断开并重新连接互联网的模拟器。一次调用initWithRequest:既不会导致connectionDidFinishLoading:
也不会导致didFailWithError:
被调用。
我在循环中调用并获得以下结果(当断开连接时)。
DidFailWithError: Fetch failed: The Internet connection appears to be offline.
几秒钟后的下一次呼叫(因为Internet重新连接)。
DidFailWithError: Fetch failed: A server with the specified hostname could not be found.
而且我下次调用两个回调都没有被调用。
你能改说一下吗?我不确定这个问题。 – 2011-02-18 22:09:05