我想添加一個改變,如果用戶沒有連接到互聯網,並點擊一個web視圖鏈接。可達性Xcode iOS5
-(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Can't connect. Please check your internet Connection" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
問題就在這裏:
虛空( - )給出錯誤:()無效的參數類型「無效」,以一元表達
這是在一個.c文件或一個.m文件?這是在Objective C @implementation塊內嗎?以前的所有功能嵌套在文件中是否正確? – hotpaw2