やあ!私はアプリケーションを開発しています。その中で、1 つの webview を作成しています。その webview を使用して、最初の URL の完了後に次の URL をロードしたいと考えています。- (void)webViewDidFinishLoad:(UIWebView *)webView
私はこのように書いた
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
alert_View=[[UIAlertView alloc]initWithTitle:@"\n\nData sent successfully!" message:nil delegate:self cancelButtonTitle:nil otherButtonTitles:nil, nil];
[alert_View show];
[alert_View release];
[NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(removeAlert:) userInfo:nil repeats:NO];
}
そして removeAlert メソッドは次のようになります
-(void)removeAlert:(id)sender
{
[alert_View dismissWithClickedButtonIndex:-1 animated:YES];
[web loadRequest:[arr objectAtIndex:1];
}
arr
配列には、準備されたすべてのリクエストが含まれます。このremoveAlert
メソッドが直接実行されるたびに、-(void)webView:didFailLoadWithError:
メソッドが起動されます。最初のリクエストの終了後に別のリクエストをロードする方法を教えてください。