我想添加一个改变,如果用户没有连接到互联网,并点击一个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