I created number of UIWebviews and add it to my view. And gave load request. I want to stop loading the uiwebview with tag=10. How can this implement?
You can stop the UIWebView
from loading in UIWebViewDelegate
method:
-(BOOL)webView:(UIWebView*)webView shouldStartLoadingWithRequest:(NSURLRequest*)request navigationType:(UINavigationType)navigationType
{
if(webView.tag==10)
{
return NO;
}
return YES;
}
It will Help you.
try something like this:
UIWebView *webView = [self.view viewWithTag:10];
if(webView)
{
[webView stopLoading];
}
You can write webView stopLoading method in viewWillDisappear
-(void)viewWillDisappear:(BOOL)animated
{
if([webView isLoading])
{
[webView stopLoading];
}
}