In my application i have UIWebView
and i want to detect if a MP3 file is load(download).
So i use this UIWebView
Delegate method:
- (BOOL)webView:(UIWebView*)webview shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {
NSURL *url = [request URL];
if ([[[url pathExtension] lowercaseString] isEqualToString:@"mp3"]) {
[self userDidClickUrl:url];
return NO;
}
return YES;
}
The problem is that sometimes the URL is without mp3 string inside,and the UIWebView open the Native player. It's possible to detect it? I want to detect when a mp3 file is start loading.