I want to listen the webview and do something with the opened url. I do this with this delegate method.
1- i try to click a button inside the webview. It works in iOS9 but not in iOS8. How can i make it clickable in iOS 8 as well ?
2- when i click a button inside the webview it opens a new url(e.g:close.com). when i get that link then i will hide the webview. but when i click the button then it gives an error in log screen like
Code:
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
NSString *currentLink = request.URL.absoluteString;
if ([currentLink containsString:@"close"]) {
[self closeTheAdvView];
}
return YES;
}
2- when i click a button inside the webview it opens a new url(e.g:close.com). when i get that link then i will hide the webview. but when i click the button then it gives an error in log screen like
what can be wrong here ?-canOpenURL: failed for URL: "" - error: "Invalid input URL"
Last edited: