2012-02-20 4 views
0

인터넷에 연결되어 있는지 여부를 감지하는 코드가 있으며 때로는 제대로 작동하지 않습니다. 코드는 다음과 같습니다.인터넷에 연결되어 있는지 확인하는 코드가 제대로 작동하지 않습니다.

-(void) webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error 
{ 
    UIAlertView *alert= [[UIAlertView alloc] initWithTitle:@"Error" message:@"Couldn't connect to the Internet. Please check your connection." delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil]; 
    [alert show]; 
    [alert release]; 
} 

문제는 웹이 다른 것들을 위해로드되지 않고 연결이 잘못되어 있기 때문이 아니라는 것입니다. Wi-Fi를 확인하는 더 좋은 방법이 있기를 바랍니다. 어떤 생각?

+0

인터넷 히스테리의 발작, 응? –

+6

[iPhone SDK에서 활성 인터넷 연결을 확인하는 방법?] (http://stackoverflow.com/questions/1083701/how-to-check-for-an-active-internet-connection-on-iphone -sdk) –

+0

당신은 와이파이 연결을 위해, 심지어 호스트 도달 가능성을 확인할 수 있습니다 - 조쉬는 당신에게 준 링크를 확인 –

답변

관련 문제