このコードを使用して、アプリを初めて開いたときにインターネットをチェックします。
//No Internet Connection error code
-(void)webView:(UIWebView *)webVIEW didFailLoadWithError:(NSError *)error {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Internet Connection!" message:@"In order to use this app you need an active Internet connection!" delegate:self cancelButtonTitle:@"Close" otherButtonTitles:nil, nil];
[alert show];
}
//Close app from Alert View
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
exit(0);
}
jQuery .click()関数を持つUIWebViewアプリがあります。ユーザーがそのボタンをクリックしたら、インターネットを再度確認する方法はありますか?