Basically, what I want is a function that executes this function [self.navigationController popViewControllerAnimated:YES];
when a certain button is pressed and if you are on a Google page. But the function happens even if I am not on a Google page. Is there something I might be missing?
- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
{
if(wasClicked)
{
if([[request.URL absoluteString] rangeOfString:@"google"].location!=NSNotFound)
{
[self.navigationController popViewControllerAnimated:YES];
}
}
return YES;
}